Sprintstar
Sprintstar

Reputation: 8159

plupload with ASP.NET forms authenticated handler

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

Upvotes: 1

Views: 903

Answers (1)

Sprintstar
Sprintstar

Reputation: 8159

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. :)

Upvotes: 2

Related Questions