相关疑难解决方法(0)

jQuery文件上传 - 如何识别所有文件上传的时间

我正在使用jQuery文件上传插件.

我希望能够在所有选定文件上传完成后触发事件.到目前为止,我有一个事件,当选择文件上传和每个特定文件完成上传时执行操作 - 有没有办法检测所有选定的文件是否已完成上传?

实际的应用程序在这里http://repinzle-demo.herokuapp.com/upload

我的输入字段如下所示:

<div id="fine-uploader-basic" class="btn btn-success" style="position: relative; overflow: hidden; direction: ltr;">
Run Code Online (Sandbox Code Playgroud)

我的脚本代码如下所示:

<script>
        $(function () {
            $('#fileupload').fileupload({
                dataType: 'json',
                add: function (e, data) {   // when files are selected this lists the files to be uploaded
                    $.each(data.files, function (index, file) {
                        $('<p/>').text("Uploading ... "+file.name).appendTo("#fileList");
                    });
                    data.submit();
                },
                done: function (e, data) {  // when a file gets uploaded this lists the name
                    $.each(data.files, function (index, file) {
                        $('<p/>').text("Upload complete ..."+file.name).appendTo("#fileList");
                    });
                }
            });
        }); …
Run Code Online (Sandbox Code Playgroud)

javascript jquery file-upload jquery-plugins

15
推荐指数
1
解决办法
1万
查看次数

标签 统计

file-upload ×1

javascript ×1

jquery ×1

jquery-plugins ×1