remove redirects to request.url's cause those cause unpredictable
behavior depending on how nginx is set up
This commit is contained in:
parent
c961541302
commit
411ea91084
1 changed files with 3 additions and 2 deletions
5
app.py
5
app.py
|
@ -97,11 +97,12 @@ def image():
|
|||
|
||||
if request.method == 'POST':
|
||||
if 'image' not in request.files:
|
||||
return redirect(request.url)
|
||||
return render_image_template()
|
||||
|
||||
file = request.files['image']
|
||||
|
||||
if file.filename == '':
|
||||
return redirect(request.url)
|
||||
return render_image_template()
|
||||
if file:
|
||||
extension = os.path.splitext(file.filename)[1]
|
||||
|
||||
|
|
Loading…
Reference in a new issue