jquery-filedrop
jquery-filedrop copied to clipboard
Adding a (regular) button for selecting images
I see there is an option for fail proofing if the browser does not support, but I want both at the same time since dragging something inside is not necessary always the quickest/user friendly way. So I'd like to offer the users both...
how can I do that?
@demiro did you figure out a solution for this?
Seems like you could just do this separately. Or are you trying to trigger an automatic upload if they do select a file?
yes, I am trying to trigger an automatic upload...
Up
this is how I did it:
comment out lines 75 - 79:
// $('#' + opts.fallback_id).css({
// display: 'none',
// width: 0,
// height: 0
// });
comment out lines 84 - 86:
// this.on('click', function(e){
// $('#' + opts.fallback_id).trigger(e);
// });
specify fallback element ID in the filedrop options
fallback_id: 'file-input',
and add a file input to your HTML.
That's it.