Added case sensitive png format

This commit is contained in:
2019-03-04 00:41:08 +01:00
parent a873592b5e
commit 99618b884e

View File

@@ -50,7 +50,7 @@ def upload(id):
print('processing file: ', filename)
ext = os.path.splitext(filename)[1][1:].strip().lower()
if ext in set(['jpg', 'jpeg', 'png']):
if ext in set(['jpg', 'jpeg', 'png', 'PNG']):
print('File supported moving on.')
else:
raise InvalidFiletype('Unsupported file type {}'.format(ext), status_code=415)