douyigua5381
2015-08-07 18:20
浏览 414
已采纳

使用jquery文件上传保持文件顺序

I was looking at the upload script here:

http://demo.tutorialzine.com/2013/05/mini-ajax-file-upload-form/

It is using jquery file upload to upload multiple files at once. I would like to know how to pass the order of the files that were selected to the upload.php script. ie. if you have 1.jpg, 2.jpg, 3.jpg, 4.jpg, and 4 finishes uploading first, can upload.php receive a variable that tells it that it is the 4th image that was selected? Does jquery file upload have a way of adding the order to the form action perhaps?

Thanks in advance.

图片转代码服务由CSDN问答提供 功能建议

我在这里查看上传脚本:

http://demo.tutorialzine.com/2013/05/mini-ajax- file-upload-form /

使用jquery文件上传一次上传多个文件。 我想知道如何将所选文件的顺序传递给upload.php脚本。 即。 如果你有1.jpg,2.jpg,3.jpg,4.jpg和4个完成首先上传,可以upload.php接收一个变量,告诉它它是第四个被选中的图像? jquery文件上传是否有办法将命令添加到表单操作?

提前致谢。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • dqask02082 2015-08-07 19:38
    已采纳

    Well it was a really easy fix once I found it. There is a variable in the jquery.fileupload.js file called sequentialUploads. Set it to true, and it will force the order of uploads to be the order in which the files are selected.

    评论
    解决 无用
    打赏 举报
查看更多回答(1条)

相关推荐 更多相似问题