plupload icon indicating copy to clipboard operation
plupload copied to clipboard

PL Upload does not work after Response Redirect used in asp.net

Open 11344 opened this issue 7 years ago • 3 comments

I have wrote code for PLUpload in aspx page and in configuration of PLupload URL i pointed to handler which uploads file to server.

It works perfectly fine. But if i perform Response.Redirect on aspx page, PLupload does not work. Instead of hitting the handler during upload, it hits the aspx page. So please help.

PL Upload configuration code :

$(function () { $("#uploader").plupload({ // General settings runtimes: 'html5,flash,silverlight,html4', url: "Handler1.ashx", unique_names: true, // Maximum file size max_file_size: '2mb', chunk_size: '1mb', // Resize images on clientside if we can resize: { width: 200, height: 200, quality: 90, crop: true // crop to exact dimensions }, // Specify what files to browse for filters: [ { title: "Image files", extensions: "jpg,gif,png" }, { title: "Zip files", extensions: "zip,avi" }, { title: "PDF files", extensions: "pdf" } ], // Rename files by clicking on their titles rename: true, // Sort files sortable: true, // Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that) dragdrop: true, // Views to activate views: { list: true, thumbs: true, // Show thumbs active: 'thumbs' }, flash_swf_url: 'PlUpload/js/Moxie.swf', silverlight_xap_url: 'PlUpload/js/Moxie.xap', }); });

11344 avatar Sep 25 '18 06:09 11344

It isn't clear when or why you do a redirect. Are you redirecting to upload handler or from upload handler?

jayarjo avatar Sep 25 '18 19:09 jayarjo

Thanks for the reply. Suppose there is a button in aspx page which contains PLupload code. Lets say on click of that button page refreshes.

Code inside button : protected void btnredirect_Click(object sender, EventArgs e) { Response.Redirect(Request.RawUrl); }

After this redirection PLUpload does not work ( it's not hitting handler mentioned in configuration)

11344 avatar Sep 26 '18 04:09 11344

Sorry I still don't understand the flow. Why should page refresh? Whole point of Plupload is to upload without refreshes.

jayarjo avatar Sep 26 '18 17:09 jayarjo