文件上传通过拖放 [英] file upload via drag and drop

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

问题描述




我需要能够让一个用户从定位文件系统拖动多个图像到flash / flex / html5应用程序,然后获取文件名的细节然后联系服务器


服务器响应,然后上传文件(假设服务器验证通过)

我知道这可以在Java,但这不是一个选项。



请不要建议使用FileReference.browse函数,因为修饰符是愚蠢的(这里没有玩笑)来使用它,
需要拖放。

这个功能适用于目前所有流行的浏览器(Chrome,FireFox,IE,Safari)。



下面是我想要在网页上放置一个图像,说明放在这里,并允许他们上传文件(s)。


此外,这也必须是一个Web界面,我不想安装一个插件或一个下载的空气应用程序(他们是愚蠢的所有这一切) >

这可能与Flash / flex / html5?或者他们的任意组合 解决方案

不可能在flash / flex中使用web应用程序 - 但是你可以做到里面的空气。基本上是一个安全问题。



就HTML5而言 - 只有Firefox和Chrome目前支持HTML5原生拖放事件,我知道(Chrome会包含一些其他的webkit像Safari这样的变种)

Ok here is my problem.
I need to be able to have a user drag multiple images from the locate file system onto the flash/flex/html5 app which will then taker the file name details and contact the server.
Upon server response then upload the file ( assuming server validation passed ).

I know this can be done in Java but that is not an option.

Please do not suggest the FileReference.browse function as the retouchers are to stupid(no joke here) to use this and it has to be drag and drop.
This has to work with all current versions of the popular browsers( Chrome,FireFox,IE,Safari)

What it comes down to is I want to put an image up on the web page stating drop here and allow them to upload the file(s) by dropping on it.
Also this has to be a web interface I do not want to install a plugin or a downloaded Air app.(they are to stupid for all this)

Is this possible with flash/flex/html5? or any combination of them

解决方案

Not possible with a web app in flash/flex - but you can do it inside air. It's basically a security issue.

As far as HTML5 - Only Firefox and Chrome currently support HTML5 native drag and drop events that I'm aware (Chrome would include some other webkit variants like safari)

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

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