0

I use uploadify 3.0.0 for uploading files. This uploadify use swf for sending ajax requests. After the research, I found out that when the requests are sent via swf, so new session is opened in the server. Thus, all the data that I've stored in session becomes unaccessible(because new session is created).

How I can use this uploadify, so it **WON'T change the current session in the server?

CLIENT_SIDE

$('#upload').uploadify({
        swf: '/Scripts/jqUploadify-3.0.0/uploadify.swf',
        uploader: '/FileUpload/UploadLogo',
        cancelImage: '/Scripts/jqUploadify-3.0.0/uploadify-cancel.png',            
        auto: true
    });

SERVER_SIDE

 [HttpPost]
    public JsonResult UploadLogo()
    {

        if (Request.Files.Count > 0)
        {
            //Session["PATH"] is NULL, because the session is changed because of SWF
            var path = Session["PATH"] as string;

        }

        return Json(new { });
    }

Thank you

tereško
  • 58,060
  • 25
  • 98
  • 150
theateist
  • 13,879
  • 17
  • 69
  • 109

1 Answers1

2

Typically you have to pass the session ID to uploadify as a parameter, or use a cookie grabber that will pull the cookies out of the browser into the SWF. See Uploadify (Session and authentication) with ASP.NET MVC for what you probably need.

Community
  • 1
  • 1
Femi
  • 64,273
  • 8
  • 118
  • 148