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 '/'