remove redirects to request.url's cause those cause unpredictable

behavior depending on how nginx is set up
This commit is contained in:
TT-392 2024-12-04 21:55:30 +01:00
parent c961541302
commit 411ea91084

5
app.py
View file

@ -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]