2012-04-27 3 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",