开发者

Multiple-target cross-browser drag& drop file upload

开发者 https://www.devze.com 2023-01-31 06:08 出处:网络
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

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 开发者_如何学Pythonlocal 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?


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,


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消