Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upload File Directly to S3 with Progress Bar [closed]

Relating to this question, Upload files directly to Amazon S3 from ASP.NET application, is there any way to do this and have a progress bar?

---- EDIT ----

Two days later and still no luck with a direct way. Found one thing that looks promising but not free: http://www.flajaxian.com/

Uses flash to upload directly to S3 with a progress bar.

like image 795
John Boker Avatar asked Jan 26 '09 03:01

John Boker


People also ask

What is the best way for the application to upload the large files in S3?

When you upload large files to Amazon S3, it's a best practice to leverage multipart uploads. If you're using the AWS Command Line Interface (AWS CLI), then all high-level aws s3 commands automatically perform a multipart upload when the object is large. These high-level commands include aws s3 cp and aws s3 sync.

Does Amazon S3 upload resume on failure?

Can Amazon S3 uploads resume on failure or do they need to restart? A. B. You can resume them, if you flag the “resume on failure” option before uploading.

Does S3 upload overwrite?

By default, when you upload the file with same name. It will overwrite the existing file. In case you want to have the previous file available, you need to enable versioning in the bucket.


1 Answers

I'm looking for a solution as well. Maybe this will be of some help,

From AWS Dev Commnity But in many languages (PHP, Java), for big files, you have to use streams through which the language environment will take chunks of your big file one after the other (in order to fill up central memory with huge amount of data for the http POST of S3 needed for the upload.

The nice thing about stream is that they have a callback called whenever the next chunk is read for to further PUT (in the https sense) data to S3. You can use this callback to compute and display the progress on the client UI.

See the doc of libcurl to see in details how all this works.


Update: It looks like there are two straightforward options.

  1. Flash, via the FileReference class
  2. With a Java applet

I personally hate using 3rd party extensions (Flash, Java) to make an app function, but I haven't found another way.

like image 102
Blaine Avatar answered Sep 18 '22 10:09

Blaine