Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

8 - Upload directly to S3 - Non-File API browsers #899

Closed
rnicholus opened this issue Jun 21, 2013 · 1 comment
Closed

8 - Upload directly to S3 - Non-File API browsers #899

rnicholus opened this issue Jun 21, 2013 · 1 comment

Comments

@rnicholus
Copy link
Member

Created from #582.

Some notes:

  • allow delete file (via local server)
  • allow cancel
  • allow custom parameters (via x-amz-meta-paramname request params)
  • allow file size validation (server-side) via content-length-range policy document property
  • allow edit filename
  • allow uploading of Blobs
  • allow paste image to upload (where supported)
  • get key API method
  • keyname option: dynamic, uuid, function that is optionally promissory
  • public key (access key) option
  • ACL option
  • allow CORS support
  • I will include an optional POST request sent to the server with specific information when the upload has completed. Integrators can also make their own ajax call in their onComplete callback.
  • Status codes will be used to determine upload status.
  • Error messages from S3 will be parsed and used to display/reporting
  • Only inherited property from request that is relevant is endpoint. The endpoint value must be http://{bucketname}.s3.amazonaws.com. "https" is also a valid protocol.
  • A success redirect URL will be required to determine upload status. My guess is that the redirect page be on the same origin as the uploader window. So, if I cannot parse the contents of the iframe due to an access violation, this would indicate that the success URL has not been hit (meaning failure).
signatureEndpoint option (POST):

The endpoint that, when passed a JSON policy document, will return a base-64 encoded signature and a base-64 encoded policy document. These items must be sent along with the request to S3. The response is expected to be a JSON response,with both policy and signature properties. For more information on creating a signature, see the AWS article on HTML POST form upload support (http://aws.amazon.com/articles/1434/ and http://docs.aws.amazon.com/AmazonS3/latest/dev/HTTPPOSTExamples.html).

@ghost ghost assigned rnicholus Jun 21, 2013
@rnicholus
Copy link
Member Author

Due to lack of JSON support, I do not plan on natively supporting IE7. However, I may not prohibit use of IE7 with the S3 uploader. Normally, I would disable the upload and possibly include a message indicating that this browser is not supported. For integrators that must support IE7 w/ S3 uploads, you can include Douglas Crockford's json2.js polyfill. This should permit the uploader to work correctly in S3 mode.

In #846, we may add the option to include polyfills like json2.js in the combined file for cases such as this.

rnicholus pushed a commit that referenced this issue Jul 23, 2013
…into common util file, may relocate this to a more specific location later
rnicholus pushed a commit that referenced this issue Jul 23, 2013
…ify a same-origin url for Amazon to redirect to on success from a form-based upload
rnicholus pushed a commit that referenced this issue Jul 23, 2013
rnicholus pushed a commit that referenced this issue Jul 24, 2013
rnicholus pushed a commit that referenced this issue Jul 24, 2013
…empt to log an error from the server if empty response

This may occur if the server or some middleware simply sets the response code and leaves the payload empty or unparseable.
rnicholus pushed a commit that referenced this issue Jul 25, 2013
rnicholus pushed a commit that referenced this issue Jul 25, 2013
rnicholus pushed a commit that referenced this issue Aug 1, 2013
…ctEndpoint is not set for non-File API browsers
rnicholus pushed a commit that referenced this issue Aug 1, 2013
rnicholus pushed a commit that referenced this issue Aug 2, 2013
rnicholus pushed a commit that referenced this issue Aug 2, 2013
rnicholus pushed a commit that referenced this issue Aug 2, 2013
rnicholus pushed a commit that referenced this issue Aug 2, 2013
rnicholus pushed a commit that referenced this issue Aug 5, 2013
rnicholus pushed a commit that referenced this issue Aug 5, 2013
rnicholus pushed a commit that referenced this issue Aug 7, 2013
rnicholus pushed a commit that referenced this issue Aug 9, 2013
rnicholus pushed a commit that referenced this issue Aug 9, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant