完成多个文件上传 [英] Finish of Multiple file upload

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

问题描述

我有一个使用Blueimp jQuery-File-Upload插件的问题( https://github.com/blueimp / jQuery-File-Upload

有一个回调函数或一个替代方法,知道何时完成多个文件的上传?
我不想知道什么时候完成每个文件的上传,但是什么时候完成整个过程(All Uploads Complited)。

还有机会知道有多少文件已经被加载了,并且被请求了多少? 解决方案

请看看 停止回拨 选项:



.bind('fileuploadstop',function(e){/ * ... * /})

如果您想跟踪上传的文件,请尝试使用:

 bind('fileuploaddone',function(e,data){} 


$('#fileupload'
您的集合
data.files 只包含1个对象,因此您可以跟踪上传文件的数量。

I have a question about the use of Blueimp jQuery-File-Upload plugin (https://github.com/blueimp/jQuery-File-Upload)

There is a callback function or an alternative method, to know when is finished an upload of multiple files? I do not want to know when is finished the upload of every single file, but when is finished the entire process (All Uploads Complited).

There is also the opportunity to know how many files have actually been loaded and how many they were requested?

解决方案

Please have a look at the "stop" callback option:

.bind('fileuploadstop', function (e) {/* ... */})

And If you want to track uploaded files try to use this:

$('#fileupload').bind('fileuploaddone', function (e, data) { }

Your collections data.files only contain 1 object each, hence you can track the count of files been uploaded.

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

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