question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

upload_file return value

See original GitHub issue

Both PutObject and CompleteMultipartUpload respond with data that includes the VersionId and ETag. [1] [2]

It would be really useful if S3Transfer.upload_file could return this response, or some part of the response.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:9
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
benmannscommented, Jan 24, 2020

A few options I’ve thought of to work around this:

  1. Use a unique key that will never be chosen again. E.g. upload to a UUID and then head that object to get the version ID.
  2. Pass a unique Metadata key and value in ExtraArgs. Verify that when checking for the output version.
  3. If all you care about is that all files get version IDs copied somewhere you can subscribe to the bucket’s S3 events and push file creation/update metadata to an outside data storage system.
2reactions
eodecommented, Dec 4, 2018

looks like this isn’t going anywhere. This actually destroys the viability of using s3transfer manager in any case where there could potentially be more than one version uploaded, as one can’t guarantee that the data from a subsequent ‘head’ call refers to the same file – since s3 is eventually consistent.

That’s a pretty bad breakage, rather than just a feature request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

File Upload Return Value - Stack Overflow
It's the return value from PHP's serialize() function when passed an array equivalent to the following: array( 0 => "9201", 1 => "9206"...
Read more >
WebClient.UploadFile Method (System.Net) - Microsoft Learn
The following code example uploads the specified file to the specified URI using UploadFile. Any response returned by the server is displayed on...
Read more >
How can I get a return value from $_FILES ? - CodeProject
When I try to upload a file, I want to test if the file is uploaded, so trying to put $_FILES in alert...
Read more >
Request Files - FastAPI
Define a file parameter with a type of UploadFile : ... If you use File , FastAPI will know it has to get...
Read more >
The uploadFile method - IBM
uploadFile (source,target,versionFlag) ... String, The fully qualified path (on the local file system) of the file to upload ... Return value for uploadFile...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found