← view all posts

ups!

I missed a VERY important event in the .fla of FlashUP


It is DataEvent.UPLOAD_COMPLETE_DATA, which is called when the client receives the response from the server, after the file was uploaded. 

So, you'd have to add the event like this:

file.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, uploadCompleteHandler);

and then the hander:

function uploadCompleteHandler(event:DataEvent):void
{
//this is when we have to call the js, not in completeHandler()
ExternalInterface.call("flashup_fileComplete", event.target.name, event.data);
}

------

Another important thing to have in mind is that Flash upload connection opens a new session with the server, so if you are using the flash uploader in a section which requires authentication, FlashUP is not going to work out of the box.

The fix is to send the cookie or sessionid (or whatever you use) to the flash via FlashVars, and then append that value to the server's upload url, so it can check where the connection comes from.

A mess. Too many hours wasted to discover these things... -_-¡


  
»Post a comment
(Tags allowed: <b> <u> <s>)

 
Write down: BASTAR  

← view all posts


All content is Copyright 2009 Diego Fernández Goberna, unless otherwise stated.