Fine Uploader 5.4 — AWS S3 Version 4 Signature Support

Update: November 17, 2015–5.4.1 Hotfix Release

Ray Nicholus
Fine Uploader

--

  • HTML structure of initial file lists is invalid. (#1498)

Support For AWS S3 Version 4 Signatures

Since version 3.8, Fine Uploader has natively supported uploads directly to an S3 bucket from the browser. Requests were signed using Amazon’s version 2 signature algorithm. Since then, AWS has been pushing a vastly different signing algorithm, known as version 4. While all S3 regions support version 2 and version 4 signatures, newer regions, such as Frankfurt, only support version 4 signatures. Future regions will likely have the same limitation. As a result, version 4 signature support has been heavily requested of Fine Uploader S3 users. Starting with Fine Uploader 5.4, this signing algorithm is officially supported by the library. This support extends to “serverless” uploads to S3 and uploads to S3 through a CDN/proxy.

Adding support for version 4 signatures to Fine Uploader S3 was a significant undertaking due to the extreme complexity of the new signing process. Luckily, I was able to do this without any breaking changes to the library. As a result, if you want to continue using version 2 signatures, you do not have to make any changes to your server or client-side code after upgrading to Fine Uploader 5.4. Version 4 signature support exists alongside version 2. If you’d like to enable version 4 support, you must follow these steps:

  1. Set the signature.version option to 4. You may also use a value of 2 to explicitly switch to version 2 support, but this is not necessary as the default value of this option is 2.
  2. Optionally set the objectProperties.region option to the appropriate region for your S3 bucket. This defaults to “us-east-1”.
  3. Update your server-side signature code to support version 4 signatures. I have updated the PHP, Java, and NodeJS server-side examples to include this support. For other languages, please follow the directions on the S3 server-side documentation page.

Note that there are browser-side performance consequences associated with version 4 signatures when the chunking feature is enabled. This is, unfortunately, unavoidable, as Amazon has required all chunk data (including the file bytes) to be hashed. Fine Uploader, of course, must do this in the browser before sending the signature request to your server.

Fine Uploader 5.4 also brings a host of bug fixes. For more information, please see the list of cases associated with this milestone in the GitHub project’s issue tracker.

What’s Next?

The next planned release is currently version 5.5. In this next version of Fine Uploader, we plan to address support for standard HTTP request headers in Fine Uploader S3. This will allow you to, for example, easily set a Content-Disposition header on any object uploaded to S3 in order to force a download when the object is requested. Additionally, Fine Uploader S3 will be adjusted to accommodate clock drift on a user’s machine. This will put an end to issues the prevent uploads to S3 when an uploader’s machine time is not accurate. The next planned release after 5.5 is 6.0, which will contain some substantial new features and adjustments.

We Love Customer Feedback

Is something missing from Fine Uploader? Please let us know. We always give priority to useful customer-requested features. Take the opportunity to guide the evolution of Fine Uploader around your needs. The community is the most important aspect of this library, and we always love to hear from you.

Happy Uploading!

--

--