Multiple-target cross-browser drag& drop file upload

柔情痞子 提交于 2019-12-24 07:38:55

问题


We're investigating if it's possible to have the following: A webpage with multiple 'folders' to which a user can drag & drop a files. It's meant to be used as an interface to upload scanned documents to an archive.

For example, we would have page that states: 'Quotes', 'Invoices' & 'Misc'. Depending on the sort of document the user would drag & drop the file from the local file system to one of these three folders. It should then upload the file to the correct folder on the web server.

Is this possible, and if it is, any existing solutions using ASP.NET?


回答1:


You can use modern browsers HTML5 functionalities to do so. A detailed explanation here: http://www.useragentman.com/blog/2010/01/10/cross-browser-html5-drag-and-drop/ There is also the jQuery plugin: https://github.com/weixiyen/jquery-filedrop This one is a bit bogus (truncates files with accents like in french, doesn't handle correctly several drop areas in the same page, ...), but are easy to fix (I sent a fixed version to the author weeks ago, but didn't get any feedback...) With some Ajax and the correct server-side solution, it works like a charm. I don't know any .NET solution, though. Best,




回答2:


You could use a silverlight app or a java applet, but those are the only solutions that I know of... The users would obviously need to have silverlight or the jre installed.



来源:https://stackoverflow.com/questions/4491333/multiple-target-cross-browser-drag-drop-file-upload

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!