1

I would like to know, if is it possible to use multipart upload to S3 via a web browser (low-level API)?

If that is the case are there any demo web apps with source code or tutorials?

Thanks in advance

References http://docs.amazonwebservices.com/AmazonS3/latest/dev/HLTrackProgressMPUJava.html

4

3 回答 3

3

The question appears to be about multi-part uploads from a browser, not single-part uploads.

Yes, you can do single-part uploads from a web browser using HTTP POST.

No, you cannot do a multi-part upload via a standard web browser, although such a thing might be possible using Flash/Silverlight. This will, of course, eliminate most mobile devices as well as any desktop users who have purposefully uninstalled these plugins (like me!).

于 2012-07-26T04:39:15.000 回答
1

From your question, it doesn't seem like you're looking for a solution in a specific language.

Anyway, there's a page on the official s3 docs that shows the browser-based uploads feature. It might help to check it out.

于 2012-07-25T07:04:24.003 回答
-3

It certainly is possible, look at http://sente.cc/upload_to_s3.html for a working example which uploads directly to S3 from the browser.

Also see https://stackoverflow.com/a/6912340/217652

<html> 
  <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
  </head> 
  <body> 
  <h3>refresh the page after you've submitted to see your new image</h3>
    <div style="width:300px">
    <form action="http://s3.amazonaws.com/dev.sente" method="post" enctype="multipart/form-data"> 
      <fieldset>
      <input type="hidden" name="acl" value="public-read" /> <br /> 
      <i>name of key:</i><input type="text" name="key" readonly="true" value="image.jpg" /> <br /> 
      <input name="file" type="file" /> <br /> 
      <input name="submit" value="Upload" type="submit" /> 
    </fieldset>
    </form> 
  </div>
    <br />
    <a href="http://s3.amazonaws.com/dev.sente/image.jpg">http://s3.amazonaws.com/dev.sente/image.jpg</a><br />
      <a href="http://s3.amazonaws.com/dev.sente/image.jpg"><img src="http://s3.amazonaws.com/dev.sente/image.jpg" /></a>
    </a>
  </body> 
</html> 
于 2012-07-25T13:34:59.750 回答