plang
plang

Reputation: 5656

Drag and drop file upload library for Internet Explorer

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

Answers (4)

MyBoon
MyBoon

Reputation: 1298

I think that the best way is to use the new HTML5 Drag and Drop API and new File API.

Upvotes: 3

B T
B T

Reputation: 60983

I wrote a javascript module to do generalized drag and drop events including:

  • file dropping,
  • drag and drop within a browser window,
  • drag and drop between two different browser windows,
  • drag and drop from a browser window to an external application, and
  • drag and drop from an external application to a browser window

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

saji89
saji89

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

Nicolas S.Xu
Nicolas S.Xu

Reputation: 14554

you can try dropZone, support IE 10+

Upvotes: 0

Related Questions