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);
    });

In the above example "FileUploaded" event is not fired at all. Not sure what the problem is.

krish
  • 63
  • 6

1 Answers1

0

Have you tried this approach?

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 Is this a copy and past or a typo here? That is going to cause a JavaScript issue and most likely cause the bind and/or the whole javaScript engine to stop dead.

'<%=Url.Action("testaction", "testcontroller", 
Piotr Kula
  • 9,597
  • 8
  • 59
  • 85