2012-04-27 145 views
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”事件根本没有被触发。不确定是什么问题。Plupload -FileUploaded事件未被触发

回答

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",