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

docs(features): Add S3 Transfer Acceleration to S3 feature #1627

Merged
merged 2 commits into from
Jul 28, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions docs/features/s3.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@
Please see [the blog post on Fine Uploader S3][s3blog].


### Uploading to S3 Through a CDN
### Uploading to S3 With Transfer Acceleration
Amazon's [S3 Transfer Acceleration option][s3transferacceleration] is by far the easiest way to have your
uploads to S3 go through a CDN (Amazon Cloudfront). To start using this feature, simply enable it in your AWS
console and use `https://[bucket-name].s3-accelerate.amazonaws.com` instead of `https://[bucket-name].s3.amazonaws.com`
in the [`request.endpoint` option][requestendpoint].


### Uploading to S3 Through a CDN Without Transfer Acceleration
Support for uploads to an S3 bucket via a CDN was added in Fine Uploader 5.1.0. You can upload files to
any S3 bucket through any CDN, provided the CDN forwards all headers and does not append any additional
headers to the request that is sent on to S3.

An example of a CDN that should work fine is [fastly][fastly]. An example of a CDN that does not appear
to work is, ironically, Amazon CloudFront. There are a number of issues with CloudFront's support of POST
requests to S3. First, CloudFront appends headers to the request. To get around this, an Origin Access
Identity must be used, which makes the process quite complicated for integrators. Second, multipart encoded
POSTs to an S3 bucket appear to fail when the endpoint is a non-default CloudFront behavior. Third, there
does not appear to be any way to forward all headers to an S3 origin via a CloudFront endpoint. This is
a problem for uploads using S3's REST API, since we must include the ACL, metadata, encryption, redundancy
parameters, and a number of other information via the Initiate Multipart Upload POST request. We have notified
Amazon of these issues, but they have been unwilling to address or acknowledge them. For continuing updates
on support to CloudFront, please see [issue #1016 in the Fine Uploader GitHub issue tracker][issue1016].
headers to the request that is sent on to S3. An example of a CDN that should work fine is [fastly][fastly].
Ironically, an example of a CDN that does not appear to work is Amazon Cloudfront (see [issue #1016 in the
Fine Uploader GitHub issue tracker][issue1016]). If you'd like to use Amazon Cloudfront as a CDN for your
uploads, please use the [S3 Transfer Acceleration option][s3transferacceleration] instead.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


#### Overview
When uploading to S3 via a CDN, you must specify the name of the bucket. This is not required for uploads

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Expand Down Expand Up @@ -105,6 +104,7 @@ you are responsible for doing so _before_ passing the header to Fine Uploader S3
[params]: ../api/options.html#request.params
[requestendpoint]: ../api/options-s3.html#request.endpoint
[s3blog]: http://blog.fineuploader.com/2013/08/16/fine-uploader-s3-upload-directly-to-amazon-s3-from-your-browser/
[s3transferacceleration]: http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html
[setparams]: ../api/methods.html#setParams

{% endmarkdown %}
Expand Down