Skip to content

Commit d5c597e

Browse files
committed
Small fix
1 parent a17b11d commit d5c597e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def index():
2020
@app.route('/upload', methods=['POST'])
2121
def upload():
2222
fileob = request.files["file"]
23-
fext = secure_filename(fileob.filename).split('.')[-1]
23+
fext = secure_filename(fileob.filename).split('.')[-1].lower()
2424
if fext.lower() not in ALLOWED_EXTENSIONS:
2525
return "Error: Filename extension not allowed."
2626
filename = "{}.{}".format(''.join(sample(string.ascii_letters + string.digits, 6)), fext)

0 commit comments

Comments
 (0)