Accept application/octet-stream for CLI uploads
This commit is contained in:
@@ -98,7 +98,8 @@ def new():
|
|||||||
abort(400) # No file was uploaded
|
abort(400) # No file was uploaded
|
||||||
|
|
||||||
pic = request.files['pic']
|
pic = request.files['pic']
|
||||||
if pic.mimetype not in ['image/png', 'image/jpeg', 'image/gif']:
|
|
||||||
|
if pic.mimetype not in ['image/png', 'image/jpeg', 'image/gif', 'application/octet-stream']:
|
||||||
print(f"Unsupported image format: {pic.mimetype}")
|
print(f"Unsupported image format: {pic.mimetype}")
|
||||||
abort(400) # Consider using a more specific status code or returning an error message
|
abort(400) # Consider using a more specific status code or returning an error message
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user