Skip to content

Commit

Permalink
Update allowed_file function in fileuploads.rst
Browse files Browse the repository at this point in the history
Update allowed_file function to accept lowercase and uppercase file extensions
  • Loading branch information
shakib609 committed Jul 16, 2016
1 parent 495d834 commit fe53da4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/patterns/fileuploads.rst
Expand Up @@ -47,7 +47,7 @@ the file and redirects the user to the URL for the uploaded file::

def allowed_file(filename):
return '.' in filename and \
filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS

@app.route('/', methods=['GET', 'POST'])
def upload_file():
Expand Down

0 comments on commit fe53da4

Please sign in to comment.