Simple Drag+Drop file uploader that works like a regular file uploader
March 17, 2017 3:15 AM   Subscribe

I'm looking for a simple drag+drop file uploader script that works like a regular file uploader instead of "instant upload" I was using jquery.filer and I swear it was working in the way that I want it to but at some point yesterday it stopped working for no apparent reason and the documentation says it doesn't work like that ( I'm 99.9% certain it did, I feel like I'm going mad!)

I have a form for uploading images, it has a series of single file upload inputs. I want to be able to drag an image file into the box and have the file input work like a regular file input (ie. the file comes through with the form submit rather than being sent to a separate upload script via ajax).
The form also needs to accept multiple new images, I'd like to be able to upload multiple files to a single "new image" drop zone and again, I don't want them sent to a separate upload script, I just want to be able to submit the form like normal.

Does such a thing exist? Is there a reason why it can't exist?
posted by missmagenta to Computers & Internet (3 answers total)
This is not allowed. If JavaScript had the power to populate file fields, then a bad guy could easily make a form that secretly uploads your /etc/password or your .ssh/id_dsa.
posted by nicwolff at 6:11 AM on March 17

Drag and drop file detection is part of HTML5, though browser support is not universal. Here's an example implementation for using it to upload files and providing a fallback option:
posted by camcgee at 8:37 AM on March 17 [1 favorite]

Jquery-FileUpload has a setting to wait until a button is pressed.
posted by rhizome at 10:16 AM on March 17 [1 favorite]

« Older How do I fill out my self-assessment in...   |   The night lay coiled in the street, cobra-cold and... Newer »

You are not logged in, either login or create an account to post comments