Skip to content
Snippets Groups Projects
Commit 2be8dfd91689 authored by Efflam Lemaillet's avatar Efflam Lemaillet :robot:
Browse files

feat: use upload_fileobj insted of put_object

Refs: #12
parent c9bc1e0117e8
No related branches found
No related tags found
1 merge request!54Topic/default/bucket versioning
...@@ -102,8 +102,11 @@ ...@@ -102,8 +102,11 @@
else: else:
upload_key = key upload_key = key
extra_args = self.get_upload_extra_args(entity, attr, key) extra_args = self.get_upload_extra_args(entity, attr, key)
self.s3cnx.upload_fileobj(buffer, self.bucket, upload_key,
ExtraArgs=extra_args) put_object_result = self.s3cnx.put_object(Body=buffer,
Bucket=self.bucket,
Key=upload_key,
**extra_args)
buffer.close() buffer.close()
# when key is suffixed, move to final key in post commit event # when key is suffixed, move to final key in post commit event
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment