Will Webberley


More notes

Direct-to-S3 Uploads in Node.js

17 January 2014 (6 years ago)

A while ago I wrote an article for Heroku's Dev Center on carrying out direct uploads to S3 using a Python app for signing the PUT request. Specifically, the article focussed on Flask but the concept is also applicable to most other Python web frameworks.

I've recently had to implement something similar, but this time as part of an Node.js application. Since the only difference between the two approaches is literally just the endpoint used to return a signed request URL, I thought I'd post an update on how the endpoint could be constructed in Node.

The front-end code in the companion repository demonstrates an example of how the endpoint can be queried to retrieve the signed URL, and is available here. Take a look at that repository's README for information on the front-end dependencies.

The full example referenced by the Python article is in a repository hosted by GitHub and may be useful in providing more context.

© Will Webberley 2020