mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
upload: Add type: ignore for mimetypes.guess_type stubs issue.
This commit is contained in:
@@ -42,7 +42,8 @@ def serve_local(request, path_id):
|
|||||||
if local_path is None:
|
if local_path is None:
|
||||||
return HttpResponseNotFound('<p>File not found</p>')
|
return HttpResponseNotFound('<p>File not found</p>')
|
||||||
filename = os.path.basename(local_path)
|
filename = os.path.basename(local_path)
|
||||||
response = FileResponse(open(local_path, 'rb'), content_type = mimetypes.guess_type(filename))
|
response = FileResponse(open(local_path, 'rb'),
|
||||||
|
content_type = mimetypes.guess_type(filename)) # type: ignore # https://github.com/python/typeshed/issues/559
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@has_request_variables
|
@has_request_variables
|
||||||
|
|||||||
Reference in New Issue
Block a user