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.

Why do `Bucket.upload_file` and `Object.upload_file` not return values?

See original GitHub issue

The lower-level Bucket.put and Object.put methods do return responses, as per https://boto3.readthedocs.io/en/latest/reference/services/s3.html, but the higher-level methods do not, annoyingly. I have verified this is the case with actual code. Is there any rationale behind this, or was it oversight?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
ricbartmcommented, Mar 15, 2018

I’m in the same situation too. We rely on upload_file() method because of the benefits that it offers, specially regarding mutipart and retries, but when we work with versioned buckets, the method does not return the VersionID of the just uploaded file which makes working with large files and versioning difficult.

1reaction
alexregcommented, Dec 11, 2017

The ID would be the same for all of them though. It makes sense to return the ID at the very least.

Read more comments on GitHub >

github_iconTop Results From Across the Web

s3 file upload does not return response - Stack Overflow
I'm using the Node AWS-SDK to upload files to an existing S3 bucket. With the code below ...
Read more >
Resolve errors uploading data to or downloading data ... - AWS
Confirm that the file exists in your S3 bucket, and that the name you specified in your script matches the name of the...
Read more >
Upload objects from a filesystem | Cloud Storage
Click the Upload Files button, select the files you want to upload in the dialog that appears, and click Open. Note: If you...
Read more >
Uploading files — Boto3 Docs 1.26.34 documentation - AWS
The upload_file method accepts a file name, a bucket name, and an object ... If not specified then file_name is used :return: True...
Read more >
Programmatically Uploading Images, Videos, and Other Files
The auto value is especially useful when you don't know what type of files your users will upload, or if you are uploading...
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