【问题标题】:jQuery-File-Upload not work with iframeupload and multiple file selectionjQuery-File-Upload 不适用于 iframeupload 和多个文件选择
【发布时间】:2015-08-06 04:03:15
【问题描述】:

我在使用 blueimp/jQuery-File-Upload 插件时遇到了一些问题。 我将选项“forceIframeTransport”设置为“true”,当添加多个文件选择时,只能上传第一个文件。我检查浏览器请求,每个添加操作只提交第一个文件。我该如何解决这个问题。

这是我的选择:

$('#fileupload').fileupload({

    forceIframeTransport : true,
    url : '${rc.contextPath}/file/lib/upload',
    type : 'POST',
    autoUpload : false,
    data : {
        catId : '${catId!}',
        type : '${type!}'
    },
    sequentialUploads : true,

【问题讨论】:

    标签: jquery file upload blueimp


    【解决方案1】:

    首先要访问 iframe 元素,您可以使用它:

    $("iframe").contents().find('#fileupload').fileupload({
        forceIframeTransport : true,
        url : '${rc.contextPath}/file/lib/upload',
        type : 'POST',
        autoUpload : false,
    data : {
             catId : '${catId!}',
             type : '${type!}'
         },
    sequentialUploads : true,
    

    【讨论】:

      猜你喜欢
      • 2023-03-24
      • 1970-01-01
      • 2015-09-13
      • 1970-01-01
      • 1970-01-01
      • 2013-05-26
      • 2017-11-27
      • 1970-01-01
      • 2014-06-06
      相关资源
      最近更新 更多