mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-03-31 13:35:08 -05:00
Set Content-Length directly, Django isn't guessing it
This commit is contained in:
parent
a173f05d89
commit
12dc3c57b2
@ -2036,7 +2036,10 @@ class BulkDownloadView(GenericAPIView):
|
||||
for document in documents:
|
||||
strategy.add_document(document)
|
||||
|
||||
return FileResponse(zip_file.open("rb"), as_attachment=True)
|
||||
response = FileResponse(zip_file.open("rb"), as_attachment=True)
|
||||
response["Content-Length"] = zip_file.stat().st_size
|
||||
|
||||
return response
|
||||
|
||||
|
||||
@extend_schema_view(**generate_object_with_permissions_schema(StoragePathSerializer))
|
||||
|
Loading…
x
Reference in New Issue
Block a user