I like the multipart aspect but the key signing and putting your keys in plaintext seems unnecessary.
Here is an alternative: make a bucket with a policy where it will accept anonymous uploads (but not reads) and automatic object deletion after say 24 hours. You can then on the backend just copy the object to it's final destination. The simplicity means it becomes very versatile.
There is of course a risk that somebody will maliciously dump a huge file on you or many but it won't cost you anything because the files get automatically deleted. Furthermore, none of the files are publicly readable.
As making a policy involves no communication with Amazon, I used to just create a policy on the fly for every upload request that said "allow upload to this specific key(path)". The key would be unique to every upload request. Once the upload is done, I'd just start processing the upload and move it where it belongs.
Thus, in plaintext you'd have to put only your AccessID and a policy which would expire after a few minutes.
You almost have it. Each user would receive a STS federated token, and their attached policy would give them permission to S3 keys prefixed with their user ID.
Another alternative to consider is FineUploader which has a mature S3 module[1]. However, FineUploader does require a commercial licence of $80-$500p.a.
I don't how this could be seen as something going wrong? From my perspective the vast majority of programming is solving issues that have already been solved multiple times.
It's not like this is the first solution there's ever been to solve this problem.
No I know :-D I didn't find anything that did quite what I wanted and I understand how the signing process all works now and how to send files with XML Http Request which I didn't before. Just got a deadline for Monday morning and time spent on this could have been better spent.
It's just more that something like this appears literally the day after I build something that does the same thing - a look at the code would have helped no doubt.
Here is an alternative: make a bucket with a policy where it will accept anonymous uploads (but not reads) and automatic object deletion after say 24 hours. You can then on the backend just copy the object to it's final destination. The simplicity means it becomes very versatile.
There is of course a risk that somebody will maliciously dump a huge file on you or many but it won't cost you anything because the files get automatically deleted. Furthermore, none of the files are publicly readable.