Facebook风格的多图片上传 [英] Facebook-style multiple image upload

查看:115
本文介绍了Facebook风格的多图片上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



任何人都可以解释这是如何实现的吗?



我想在jquery中做类似的事情,而不使用flash小部件。

解决方案

HTML5文件API 使您能够以本地方式进行。基本上,你可以将 multiple =multiple属性添加到文件上传控件中:

 < input multiple =multipletype =file... /> 

缺点:只能在Firefox,Chrome,Safari等现代浏览器中运行。 IE,甚至9版本都不支持这个多重上传功能。

否则,你必须依靠一些Flash或Java上传组件。



(编辑:更改为 multiple =multiple,感谢 Ms2ger


Facebook has the ability to select multiple images in the file browser in its upload feature.

Can anyone explain how this is achieved?

I'd like to do something similar in jquery without the use of a flash widget.

解决方案

The HTML5 File API enables you to do it natively. Basically you add the multiple="multiple" attribute to the file upload control:

<input multiple="multiple" type="file" ... />

Disadvantage: Only runs in modern browsers like Firefox, Chrome, Safari. IE, even version 9 does not support this multiple upload.

Otherwise, you have to rely on some Flash or Java upload component.

(Edit: Changed to multiple="multiple", thanks to Ms2ger)

这篇关于Facebook风格的多图片上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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