Closed akent-q closed 4 years ago
You can't pass the filename like this since this function call will be rendered before the file was uploaded. Instead, you can store the filename in database or session in upload view, then get it back from the database or session:
from flask import session
@app.route('/upload')
def upload():
# ...
session['filename'] = the_filename
@app.route('/view')
def the_redirect_view():
filename = session.get('filename)
Perfect. Thanks
What's the best way to pass the uploaded filename(s) to the redirect url? e.g. something like: