FileDrop icon indicating copy to clipboard operation
FileDrop copied to clipboard

Provide the ability to support legacy browsers only

Open elisechant opened this issue 10 years ago • 1 comments
trafficstars

In addition to being a library that supports legacy browsers as well as modern ones, I would like to be able to use FileDrop as a library that supports only legacy browsers or a library that supports only modern browsers. Ideally I would like to load these conditions via separate scripts.

elisechant avatar Feb 24 '15 19:02 elisechant

Separate scripts are too much trouble to maintain. As for the modern/legacy switch there's no notion of legacy as such in FileDrop. There is very little code that is intended for legacy browsers alone. FileDrop's two upload mechanisms - AJAX and iframe - handle different cases. Iframe provides on-click file open dialog (you can't invoke one from JavaScript) while AJAX lets you drop stuff. So if you want to turn off HTML5 upload (is this what you mean by "modern"?) then just don't react to one (override upload event). If you don't want legacy (iframe) upload - then set input option to false like demonstrated in this sample: http://filedropjs.org/#snoin

ProgerXP avatar Mar 13 '15 13:03 ProgerXP