A quick picture dropzone with HTML5 drag & drop API and standard input type file.
I added an e.preventDefault() call in the drop handler. Chrome, at least, would open up the image in a blank window.
Thanks for the feedback Jason.
I did remove my e.preventDefault() because the input file doesn't seem to change on drop.
Set the input opacity to 1 and try to drop a file. The input value doesn't change. It must be a solution but I didn't find it yet :)
Is there a way I can set this up for multiple uploads? I added the multiple attribute to the input form, but am not sure what to do on the js side to provide the preview. thanks!
This is awesome. However, I cannot get it to work on my end. Would you be willing to help diagnose the issue? Everything looks good except when I drap and drop a .png file into the drop zone...nothing happens....I also can slick on the dropzone to manually upload the .png file but still no preview. I haven't incorporated any server-side code so I am working only with the code that you have provided at this point.
I created a jQuery plugin from this code a while ago.
I hope it will help you.
Need to know how to enable it? Go here.