Question

I am trying to use plupload to upload files in ASP.NET. My upload handler ideally needs to be included in the forms authentication on my site, but it doesn't work in this case. I can't see the request that plupload makes in firebug, and don't really understand what its doing. Is there any way to get around this problem?

Here is my plupload initialisation code:

$(function () {
    $("#uploader").pluploadQueue({
        runtimes: 'gears,flash,silverlight,browserplus,html5,html4',
        url: '/Handlers/UploadImage.ashx',
        filters: [
            { title: "Image files", extensions: "jpg,gif,png" },
            { title: "Zip files", extensions: "zip" }
        ],
        flash_swf_url: '/Scripts/plupload/plupload.flash.swf',
        silverlight_xap_url: '/Scripts/plupload/plupload.silverlight.xap'
    });
Was it helpful?

Solution

I had flash set as the first runtime in my list, and this was what was being used. Flash has a bug in it (http://bugs.adobe.com/jira/browse/FP-1044), which causes any existing cookies and authentication (digest/basic) information to be discarded when doing FileReference.upload. plupload has a flag to force flash to use URLStream instead of FileReference.upload. Setting this to true fixes the problem I was having. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top