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.

Uploading the user-selected file to Amazon S3

See original GitHub issue

In boto3 related documentation, examples of uploading files to Amazon S3 seem to be only for files already existing on the disk. How do I upload files that are selected by users from an HTML form input <input type="file" name="fileToUpload">?

I asked the same question on stackoverflow too, but not getting any answer so far.

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
yltang52commented, Jul 11, 2015

When can I use:

session = boto3.session.Session(gs_access_key_id=GS_ACCESS_KEY, gs_secret_access_key=GS_SECRET_KEY)
gs = session.resource('gs')
gs.Bucket(GS_BUCKET_NAME).put_object(Key=cloudFilename, Body=request.FILES['fileToUpload'])
1reaction
yltang52commented, Jul 10, 2015

@jamesls. I have to save the user-uploaded file first, and then upload it to S3 using put_object(). Well, it’s not so troublesome after all. BTW, when will boto3 support uploading files to Google Cloud Storage?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Step 3: Upload the files to an Amazon S3 bucket
Upload the data files to the new Amazon S3 bucket. Choose the name of the data folder. In the Upload - Select Files...
Read more >
AWS S3: how to download file instead of displaying in-browser
Uploading the assets to S3 is performed via the admin interface the team built. The files are uploaded directly to S3 using the...
Read more >
Uploading a Public File to Amazon Web Services (AWS) S3 ...
Example code is in this repo:https://github.com/keithweaver/python- aws - s3 /The previous video is ...
Read more >
Create blob from file javascript - Topsh.it
I need a way to convert the blob to a file to upload the image. ... The above code displays only the user-selected...
Read more >
Phishing - Wikipedia
The RapidShare file sharing site has been targeted by phishing to obtain a premium account, which removes speed caps on downloads, auto-removal of...
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