Thanks Matt, very nice — although where you’ve noted “there are some gaping security holes here” please can you actually include that as a comment in the code itself? So many people will just copy/paste the code without reading the article in detail.
Now, a proper question:
I’ve been working on a bulk uploader, where someone can essentially drag and drop an entire folder of hundreds, perhaps thousands of files, into a web app and have them upload straight to a bucket.
It works fine, except it’s an O(N) process — generation of the signed URL is currently done for each file. The roundtrip of obtaining the signed URL to send a file to takes orders of magnitude longer than actually uploading each file.
Do you have any bright ideas about how I could generate signatures for multiple files at once?