简体   繁体   English

使用GWT拖放文件上传

[英]Drag and Drop file upload with GWT

I'm trying to implement a drag-and-drop file upload for my GWT app. 我正在尝试为我的GWT应用程序实现拖放文件上传。 I've tried 我试过了

http://www.vectomatic.org/gwt/lib-gwt-file-test-latest/lib-gwt-file-test.html http://map-notes.blogspot.com/2013/01/minimal-implementation-of-file-drag-and.html http://www.vectomatic.org/gwt/lib-gwt-file-test-latest/lib-gwt-file-test.html http://map-notes.blogspot.com/2013/01/minimal-implementation -of-文件拖放and.html

However the demo itself does not work. 然而,演示本身不起作用。 What are my options for implementing this for my app without using any Flash solution. 在不使用任何Flash解决方案的情况下,为我的应用实现此选项有哪些选择。

I use the GWT Uplader - 我使用GWT Uplader -

http://www.moxiegroup.com/moxieapps/gwt-uploader/ http://www.moxiegroup.com/moxieapps/gwt-uploader/

If the browser is capable of handling file uploads using a modern HTML5 approach, the upload is handled using pure DOM elements and Javascript events. 如果浏览器能够使用现代HTML5方法处理文件上载,则使用纯DOM元素和Javascript事件处理上载。 In the case that the browser does not support the modern approach (most notably IE 9 and earlier), the GWT Uploader component instead transparently handles the uploads via the Flash-based SWFUpload library. 在浏览器不支持现代方法(最着名的是IE 9及更早版本)的情况下,GWT Uploader组件通过基于Flash的SWFUpload库透明地处理上传。

I have no problems with it, and it doesn't appear to use flash with any modern browser due the HTML5 support. 我没有任何问题,由于HTML5的支持,它似乎没有使用任何现代浏览器的闪存。 Didn't take me to long to get it added myself and integrated as they have pretty good documentation. 我没有花很长时间把它添加到自己并集成,因为他们有很好的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM