Replies: 1 comment
-
In case helpful: have now published https://github.com/uktrade/to-file-like-obj that converts iterables of bytes to file-like objects, suitable for upload_fileobj |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi 👋
This is about the upload_fileobj function that accepts file-like objects for upload to S3.
A few Python libraries seem to prefer as output iterables of bytes rather than file-like objects. For example:
Iterables of bytes can always be converted to file-like objects, like at https://stream-zip.docs.trade.gov.uk/output-examples/#file-like-object. But I wonder, should there be an upload function in boto3 itself that accepts iterables of bytes?
Beta Was this translation helpful? Give feedback.
All reactions