最好的 jQuery AJAX 多重上传器
有什么建议吗?
可能是一些非常互动的东西,我可以选择多个文件。谢谢!
Any suggestions?
Possibly something very interactive that I can multiple-select files. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
plupload - http://www.plupload.com/
支持除基本 html4 之外的各种类型的多次上传
允许上传使用 HTML5、gear、flash、silverlight、BrowserPlus 或纯 HTML4
plupload - http://www.plupload.com/
supports multiple uploads in every type except basic html4
Allows uploads using HTML5, gears, flash, silverlight, BrowserPlus or plain on HTML4
由于安全原因,无法使用 Ajax 上传文件。有一种解决方法可以将文件发布到 iframe,但您无法通过这种方式选择多个文件。
解决方案在于闪存。两个最常见的 Flash 上传器是:
swfupload - http://swfupload.org/
uploadify - http://www.uploadify.com/ (仅限 jQuery)
Uploading files with Ajax isn't possible due to security reasons. There is a work-around with posting files to an iframe, but you can't select multiple files this way.
The solution lies in flash. The two most common flash uploaders are:
swfupload - http://swfupload.org/
uploadify - http://www.uploadify.com/ (jQuery only)
另一个选择是 Uber-Uploader 我已经使用过它,它与进度条配合得很好。
Another option is Uber-Uploader I have used it and it works well with a progress bar.
或者您可以使用 Asp.Net 中的 System.Web.UI.WebControls.FileUpload 类
Or you could use the System.Web.UI.WebControls.FileUpload class in Asp.Net
在这一点上我会远离 Flash 插件。
我会使用 HTML5 上传器,如下所示:valums uploader
当然 - 您将能够仅在现代浏览器中选择多个文件,否则 - 它将逐个文件。但是嘿 - 如果人们不关心升级到较新的浏览器 - 他们真的可能不知道如何按 Ctrl + 单击。
Flash 无法正确发送 cookie(即使您使用 firefox 或 google chrome,它也会发送 IE cookie)。因此,您将丢失 cookie,从而丢失会话。有一个解决方法 - 在 POST 请求中发送 PHPSESSID - 但它只是为会话固定打开了大门。
At this point i'd stay away from flash plugins.
I'd use HTML5 uploader instead like this one:valums uploader
Sure - you'll be able to select multiple files in modern browsers only, otherwise - it'll be file by file. but hey - if person doesn't care about upgrading to newer browsers - they really probably don't know how to Ctrl+click anyways.
Flash doesn't send cookies correctly (it sends IE cookies even if you use firefox or google chrome). So - you'll lose cookies and thus sessions. There is a workaround - to send PHPSESSID in POST requests - but it simply opens door wide open for session fixation.