Skip to content
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

s3 upload_fileobj to return VersionId #3156

Closed
mdavis-xyz opened this issue Feb 18, 2022 · 4 comments
Closed

s3 upload_fileobj to return VersionId #3156

mdavis-xyz opened this issue Feb 18, 2022 · 4 comments
Labels
duplicate This issue is a duplicate. feature-request This issue requests a feature. s3

Comments

@mdavis-xyz
Copy link
Contributor

I want to upload a file and then get the VersionId.

With put_object the return value includes VersionId.
With upload_fileobj it doesn't include VersionId. In fact, upload_fileobj returns nothing at all.

I would like upload_* to return the same response as put_object.

Note that if I do a upload_fileobj then head_object, that's not atomic, so it's not guaranteed that the version id is the one for my upload.

@mdavis-xyz mdavis-xyz added feature-request This issue requests a feature. needs-triage This issue or PR still needs to be triaged. labels Feb 18, 2022
@mdavis-xyz
Copy link
Contributor Author

Is the lack of return value because there's no return value here?

@mdavis-xyz
Copy link
Contributor Author

There's also no return value here

@kdaily
Copy link
Member

kdaily commented Feb 18, 2022

Hi @mdavis-xyz,

Thanks for your post. Yes, you are correct. The transfer manager doesn't return anything from the responses of the API calls used to complete an upload. One issue is that the response would be different depending on the upload method, if it was a single small object using PutObject or a larger one using a multi-part upload.

There is an existing feature request here for a different part of the response, I'm going to close this issue and mark it as a duplicate of that one.

#2861

Please 👍🏻 the initial post to indicate your need, and add any further use cases as well.

There is an issue open at s3transfer as well, for your reference, which gives a way to patch the classes used:

boto/s3transfer#82 (comment)

@kdaily kdaily closed this as completed Feb 18, 2022
@kdaily kdaily added duplicate This issue is a duplicate. s3 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 18, 2022
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue is a duplicate. feature-request This issue requests a feature. s3
Projects
None yet
Development

No branches or pull requests

2 participants