Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
s3storage
Commits
f2eb4621f0b2
Commit
4c3a83e9
authored
Oct 06, 2020
by
Elouan Martinet
Browse files
[storages] Seek Binary before and after copying it
parent
0e6274cf3209
Changes
1
Hide whitespace changes
Inline
Side-by-side
cubicweb_s3storage/storages.py
View file @
f2eb4621
...
...
@@ -69,7 +69,9 @@ class S3Storage(Storage):
# copy Binary value, workaround for boto3 bug
# https://github.com/boto/s3transfer/issues/80
# .read() is required since Binary can't wrap itself
binary
.
seek
(
0
)
buffer
=
Binary
(
binary
.
read
())
binary
.
seek
(
0
)
self
.
debug
(
'Upload object to S3'
)
# upload_fileobj should make automagically a multipart upload if
# needed
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment