Skip to content

Commit ee8f821

Browse files
authored
Merge pull request #134 from bramverhelst/feature/133/upload_big_file
switching to upload_fileobj
2 parents 4726da6 + 0a8c20d commit ee8f821

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django_s3_storage/storage.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ def _save(self, name, content):
325325
else:
326326
content.seek(0)
327327
# Save the file.
328-
self.s3_connection.put_object(Body=content.read(), **put_params)
328+
self.s3_connection.upload_fileobj(content, put_params.pop('Bucket'), put_params.pop('Key'),
329+
ExtraArgs=put_params)
329330
# Close all temp files.
330331
for temp_file in temp_files:
331332
temp_file.close()

0 commit comments

Comments
 (0)