0
      uploader= new plupload.Uploader({
        runtimes: 'gears,html5,flash,silverlight,browserplus,html4',
        browse_button: 'pickFile',
        container: 'FileContainer',
        max_file_size: '2048mb',
        url: '<%=Url.Action("testaction", "testcontroller", 
         new { area = "testArea" }) %>',
        flash_swf_url: flashVideomm,
        silverlight_xap_url: silverLightmm,
        multipart: true,
        multipart_params: { "form": ''
        },
        filters: [
                { title: "Excel file", extensions: "xlsx" }
            ]
    });
     uploader.bind('FileUploaded', function (up, file, info) {
        // Redirect after successful upload
        alert(info);
    });

在上面的示例中,根本没有触发“FileUploaded”事件。不确定是什么问题。

4

1 回答 1

0

你试过这种方法吗?

uploader= new plupload.Uploader({
        runtimes: 'gears,html5,flash,silverlight,browserplus,html4',
        browse_button: 'pickFile',
        container: 'FileContainer',
        max_file_size: '2048mb',
        url: 'CHECK THIS AREA', 
        new { area = "testArea" }) %>',
        flash_swf_url: flashVideomm,
        silverlight_xap_url: silverLightmm,
        multipart: true,
        multipart_params: { "form": ''},
        filters: [
                { title: "Excel file", extensions: "xlsx" }
            ],
        init:
           {
             FilesAdded: function (up, files, info?) { alert(files.length);  }
            }

    });

PS这是副本和过去还是这里的错字?这将导致 JavaScript 问题,并且很可能导致绑定和/或整个 JavaScript 引擎停止工作。

'<%=Url.Action("testaction", "testcontroller", 
于 2012-04-30T13:01:50.900 回答