We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b654e6d commit e470302Copy full SHA for e470302
1 file changed
api/v1/photos.py
@@ -109,6 +109,7 @@ async def upload(
109
return Response('File must not be empty', 400)
110
111
content_type = magic.from_buffer(file.file.read(2048), mime=True)
112
+ file.file.seek(0)
113
if content_type not in IMAGE_CONTENT_TYPES:
114
return Response(f'Unsupported file type {content_type!r}, must be one of {IMAGE_CONTENT_TYPES}', 400)
115
0 commit comments