最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Drag and drop file upload library for Internet Explorer - Stack Overflow

programmeradmin4浏览0评论

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?

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?

Share Improve this question edited Dec 24, 2012 at 5:01 Mohammed H 7,04819 gold badges82 silver badges128 bronze badges asked Apr 16, 2012 at 12:11 plangplang 5,6563 gold badges28 silver badges37 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 3

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

you can try dropZone, support IE 10+

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.

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./fresheneesz/drip-drop

发布评论

评论列表(0)

  1. 暂无评论