You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I currently have a login blueprint at '/' route which redirects the user to '/files'.
'/files' should show an index of the ppath directory.
However, it is not redirecting. Here is the main app:
app = Flask(__name__)
app.config['UPLOAD_PATH'] = ppath
app.register_blueprint(login)
AutoIndex(app, browse_root=ppath)
@app.route('/files', methods=['GET', 'POST'])
def index():
if request.method == 'POST':
uploaded_files = request.files.getlist("file[]")
for uploaded_file in uploaded_files:
filename = secure_filename(uploaded_file.filename)
if filename != '':
uploaded_file.save(os.path.join(
app.config['UPLOAD_PATH'], filename))
return redirect(url_for('autoindex))
Hi, I currently have a login blueprint at '/' route which redirects the user to '/files'.
'/files' should show an index of the ppath directory.
However, it is not redirecting. Here is the main app:
This is the login function at '/'
The text was updated successfully, but these errors were encountered: