Hi all,

I discovered a problem with uploading files to a server in flex2 using 
FileReference.upload
(). My code includes something like this:

[...]
private var fileRef:FileReference = new FileReference();

private function someHandler(event:Event):void {
    var request:URLRequest = new URLRequest("band/upload_image");
    fileRef.upload(request);
}
[...]

On the backend I use ruby on rails to handle the upload. The problem is that 
every time 
fileRef.upload(request); gets called a new session will be created in rails 
(that means I have 
to re-authenticate my user before every upload request). On the other hand, if 
I replace 
e.g. fileRef.upload(request); with navigateToURL(request,"_blank"); (even if 
this makes no 
sense here) the existing session will be used.

So why does fileRef.upload(...) creates a new server session on every request? 
Is this a 
bug? 

Best regards

René

Reply via email to