使用GWT拖放文件上传 [英] Drag and Drop file upload with GWT

查看:155
本文介绍了使用GWT拖放文件上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为我的GWT应用程序实现一个拖放文件上传。我试过了

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



然而,演示本身不起作用。我使用GWT Uplader -

>

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


如果浏览器能够使用现代
HTML5方法处理文件上传,使用纯DOM元素和
Javascript事件处理上传。如果浏览器不支持
现代方法(最值得注意的是IE 9和更早版本),则GWT Uploader
组件将透过
基于Flash的SWFUpload库透明地处理上传。

我没有任何问题,并且由于HTML5的支持,它没有在任何现代浏览器中使用Flash。没有让我花很长时间来增加自己和整合,因为他们有很好的文档。

I'm trying to implement a drag-and-drop file upload for my GWT app. 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

However the demo itself does not work. What are my options for implementing this for my app without using any Flash solution.

解决方案

I use the GWT Uplader -

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. 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.

I have no problems with it, and it doesn't appear to use flash with any modern browser due the HTML5 support. Didn't take me to long to get it added myself and integrated as they have pretty good documentation.

这篇关于使用GWT拖放文件上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆