Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How to allow direct file uploads from JavaScript to Amazon S3 signed by Python (philfreo.com)
78 points by philfreo on Dec 10, 2012 | hide | past | favorite | 12 comments


Does anyone know if the same thing is possible for Azure Blob Storage? I don't believe it is now, due to the Cross Origin Resource Sharing (CORS) limitations of Azure (http://social.msdn.microsoft.com/Forums/en-US/windowsazureda...), but I'd like to double check.


I guess it's redundant for me to reply here and say no, since I'm the one saying that on the forum thread you link to also. :-)


But does this mean Javascript is talking to your server rather than S3?

Because the beauty of filepicker is that a user is not locking up one of your processes while they spend minutes uploading a file.

Especially important on Heroku, for example. Though I'm sure a self hosted node server could fare better, I'd sooner stick it out with Filepicker.


No... the file goes directly to S3 from the browser. Your server is only pinged with the _name_ of the file so the upload can be signed.


You construct the form server side but the file is uploaded from the client to S3 directly without passing through your server. It has been the best way to upload files to the internet for a long time.


Too true about your problems with Filepicker. It put me off using them for even small scale projects.


So any more details about the issues at Filepicker?

Can't see any stories on HN

An outage is expected on services, even self-made ones like this.


We've been talking with the Close.io folks directly, but you may have experienced some slowness this weekend due to increased load. We're rolling out a new architecture soon that should address the issue for the next order of magnitude.

Regarding the response issue mentioned, we had a bug where we would not return the S3 key properly for a specific code path. The bug has since been patched and pushed to production.


Thanks for that Brett

I'd still prefer a service like Filepicker over running my own service.

However would of been good to see a blog or twitter update on these issues.... I might of missed something, but so far not able to see anything of the sort?

Does Filepicker have a Status page? Like Herokus? Cannot see anything on your homepage.

Everyone expects outages and such. But seeing the acknowledgement and plans for improvement helps!

(Congrats on the service... I'm still choosing you guys!)


How is it 'direct' if there is an intermediary?


It isn't an intermediary: you get a signature from your server (no actual file data sent) and then you use S3's support for direct browser uploads to send the actual file data.

One additional point to note: this has been possible since 2008 (see http://aws.amazon.com/articles/1434) and strictly speaking doesn't need CORS. If you use a hidden FORM element that targets a hidden iframe you can do this without needing a browser that supports CORS: you do lose the upload progress information, however.


Very cool. This will be really useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: