Live data from Hacker News

Dropzone.js - JS library for drag-and-drop file uploads with image previews

dropzonejs.com

11–20 of 33 posts

Re: Dropzone.js - JS library for drag-and-drop file uploads with image previews

#13
post #9

This is nice. Anyone know if it will work for direct uploads to S3?

I've been playing with browser uploads for a few weeks now (including S3) and was too worried about the complexities of uploading to S3. I realized that there's nothing really fancy going on when uploading to S3. That's only true since Amazon added CORS support. Just add a few hidden form fields and you're good to go. Properly populating those fields can be a bit tricky, however. This gem will does a great job and sh…

You might want to take a look at our Webscript example for doing this: https://www.webscript.io/examples/s3upload. (You can ignore the download part.) It should be trivial to use Dropzone.js instead of the normal in the example HTML.

Re: Dropzone.js - JS library for drag-and-drop file uploads with image previews

#14
post #3

Wish people would stop depending on jQuery. Old browsers can default to a normal form input.

Why do you wish people would stop depending on jQ? I'm just curious.

For one, it's heavy compared to some very simple JS and a good portion of the time you don't need the entirety of the library.

That said, it does abstract much of the crap that goes along with XMLHttpRequests and all the cross-browser idiosyncrasies that go along with it.

I'd say at this point it's a matter of personal preference and performance requirements.

Re: Dropzone.js - JS library for drag-and-drop file uploads with image previews

#15
always struggle trying anything related to drag n drop on my ubuntu 12.10, because the moment i drag a file on nautilus the entire sets of apps get disabled on my unity sidebar except firefox and nautilus. and even firefox doesn't open so basically am stuck :(

Re: Dropzone.js - JS library for drag-and-drop file uploads with image previews

#18
post #14

Earlier quoted context omitted.

Why do you wish people would stop depending on jQ? I'm just curious.

For one, it's heavy compared to some very simple JS and a good portion of the time you don't need the entirety of the library. That said, it does abstract much of the crap that goes along with XMLHttpRequests and all the cross-browser idiosyncrasies that go along with it. I'd say at this point it's a matter of personal preference and performance requirements.

I think a combination of something like TinyXHR (https://gist.github.com/shimondoodkin/4706967) and querySelectorAll would suffice for many simple use-cases on modern browsers.
Post reply on HN