Rob Gonda's Blog

FileReference onComplete is not fired on Mac OS

We are launching tomorrow a project that requires Flash to upload a file to a server, which is usually done through the FireReference class... Strangely, it works everywhere except on a Mac OS. We tested on OSX with Firefox and Safari, getting identical results: the file would upload, but the onComplete call would never get triggered.

The server environment for this particular project was php4 and amfphp for all remoting calls. After reading a couple of blogs, it seems like there's a Flash-side solution by using uploadCompleteData, which only works with ActionScript 3. Our project was developed with ActionScript 2, so I kept looking. Then I found that if php (or any server-side language) returns a space it should work ... nothing yet .... then I found that someone got it to work returning a "1", and indeed, echo "1"; fixed it for all environments... finally working on Windows, IE, FF, Mac, FF, Safari ...

So now you know, if you use the Flash FileReference class, make sure to always return a string so Mac OS knows the file finished uploading.

TrackBacks
There are no trackbacks for this entry.

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?AE62B238-EA65-D66D-3496C8495CCD3D0B

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Thank you Rob!

I've been searching all over the web for a solution for this issue and now it works like a charm!
# Posted By Daniel | 11/4/09 10:46 AM
This blog is running version 5.9.003. Contact Blog Owner