jquery-filedrop icon indicating copy to clipboard operation
jquery-filedrop copied to clipboard

Adding a (regular) button for selecting images

Open demiro opened this issue 12 years ago • 4 comments

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 avatar Apr 28 '13 10:04 demiro

@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?

ryanjm avatar Jun 06 '13 21:06 ryanjm

yes, I am trying to trigger an automatic upload...

demiro avatar Jun 07 '13 11:06 demiro

Up

GesJeremie avatar Aug 05 '14 04:08 GesJeremie

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.

ivanovv avatar Oct 04 '14 18:10 ivanovv