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

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

问题描述

好的,这是我的问题.
我需要能够让用户将多个图像从定位文件系统拖到 flash/flex/html5 应用程序上,然后该应用程序将获取文件名详细信息并联系服务器.
服务器响应后上传文件(假设服务器验证通过).

我知道这可以在 Java 中完成,但这不是一个选项.

请不要建议 FileReference.browse 功能,因为修图师很愚蠢(这里不是开玩笑)使用它并且必须拖放.
这必须适用于所有当前版本的流行浏览器(Chrome、FireFox、IE、Safari)

归根结底是我想在网页上放一张图片,说明放在这里,并允许他们通过放上来上传文件.
此外,这必须是一个 Web 界面,我不想安装插件或下载的 Air 应用程序.(他们对这一切都很愚蠢)

flash/flex/html5 可以实现吗?或它们的任意组合

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

推荐答案

在 flash/flex 中无法使用 Web 应用程序 - 但您可以在空中完成.这基本上是一个安全问题.

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

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

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天全站免登陆