Reputation: 5656
I found a great library called JQuery File Upload for drag-and-drop files uploads in modern browsers. Unfortunately drag-and-drop does not work in Internet Explorer.
Drag-and-drop file upload in IE is a requirement of the project, so I'd like to find a solution for this specific situation. My idea is to end up with two versions of the upload page, one for IE, and another one for the rest of the world.
Does anyone know a good activex library for such uploads in IE, that does not require any installation?
Upvotes: 13
Views: 15735
Reputation: 1298
I think that the best way is to use the new HTML5 Drag and Drop API and new File API.
Upvotes: 3
Reputation: 60983
I wrote a javascript module to do generalized drag and drop events including:
It abstracts away a bunch of bizzaro things about the html5 drag and drop api that would otherwise waste hours of your time. Here's an example usage:
dd.drag(myDomNode, {
dragImage: true, // default drag image
start: function(setData, e) {
setData('myCustomData', JSON.stringify({a:1, b:"NOT THE BEES"})) // camel case types are allowed!*
}
})
dd.drop(myDropzone, {
drop: function(data, pointer, e) {
myDropzone.innerHTML = data.myCustomData
}
})
It works in IE as well (with the usual IE caveats). Check out the full documentation here: https://github.com/fresheneesz/drip-drop
Upvotes: 0
Reputation: 2251
FiledropJS 2, is a drag and drop file upload library, which has an <Iframe>
based fallback for working in older IE's as well. There is a demo in that page. It looks promising, check it out.
Upvotes: 0