New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is ExtraArgs for `upload_fileobj`? #789

pacahon opened this Issue Aug 30, 2016 · 1 comment


None yet
2 participants
Copy link

pacahon commented Aug 30, 2016


Suppose I have an Object:

obj = boto3.resource('s3').Bucket('bucket_name').Object('object_key')

I want to replace obj.put(Body=..., **kwargs) functionality with obj.upload_file() due to auto multiparts upload on file > 5gb (not sure about size, let's say on large files).
How can I migrate my code in that case?
Where I can set, for example, ContentEncoding? Can I just pass it to ExtraArgs like:

upload_file(..., ExtraArgs={ContentEncoding: 'blabla'})

This comment has been minimized.

Copy link

kyleknap commented Aug 30, 2016

Yep. You just need to set it using the ExtraArgs param. Here is an example in the docs: but it is for metadata instead. ContentEncoding should be very similar. All of the allowed ExtraArgs are listed here

If you have any more questions lets keep the conversation going on gitter:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment