简体   繁体   English

jQuery File Upload-逐一上传

[英]jQuery File Upload - make upload one by one

I'm using jQuery-File-Upload to make multiple uploads on my site. 我正在使用jQuery-File-Upload在我的网站上进行多次上传。 Whatever what I really like to do is upload one by one. 我真正想做的是一个接一个地上传。

Ex: 例如:

I send 3 files [1,2,3]. 我发送了3个文件[1,2,3]。

The 1 file start the upload process while the others is paused. 1个文件开始上载过程,而其他文件则暂停。

When finish the upload will cal an AJAX to save the file on the DB. 完成后,上传将校准AJAX以将文件保存在数据库中。

When returns the success message from the file 1, the file 2 start to upload while the file 3 remains paused. 当从文件1返回成功消息时,文件2开始上载,而文件3保持暂停状态。

Is there a way to change the code so they do that? 有没有办法更改代码以便他们这样做?

You can try this: open the file jquery.fileupload.js 您可以尝试以下方法:打开文件jquery.fileupload.js

In the options section, find these lines and set: 在选项部分中,找到以下行并进行设置:

  options: { 
    .
    .
    .
    singleFileUploads: true,
    limitMultiFileUploads: 1,
    .
    .
    .
    sequentialUploads: true,
    limitConcurrentUploads: 1,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM