't Bijstere spoor

't Bijstere spoor

A blog about Web development

Flash Uploader on Mac not triggering onComplete event

We have had a whole bunch of issues with the Flash 8 uploader on OS/X in the past. Now its completely broken on leopard, but before we weren't able to do multi-file uploads because the 'onComplete' event wasn't triggered from within flash.

We've been using a (modified) version of SWFUpload and also our Flash applications have had this issue..

Today I read on The Joy of Flex-blog that there's actually a really simple solution to this problem. Have your PHP (or other server-side) simply return some data. Our upload-endpoint normally always returned nothing at all, because it seemed unnecessary, but returning a small body in your HTTP response fixes the issue!

As you can tell, I'm excited.


Comments

siep
siep said on Monday, 5 November 2007 at 11:40 pm CET

Good news!

Tony Fendall
Tony Fendall said on Tuesday, 6 November 2007 at 12:40 am CET

Yay! I just came up against this exact problem, and this has saved me a lot of work

Theo
Theo said on Thursday, 8 November 2007 at 12:27 pm CET

Yeah, it such a weird bug... fortunately the first thing I tried when running in to this was to return som data. Not that I though it would fix it, but because I thought that I at least could see how far the response got, if Firefox/Firebug could see it or not.

open source cms
open source cms said on Thursday, 29 November 2007 at 9:09 pm CET

They fast repear this bug!

Kev
Kev said on Friday, 4 January 2008 at 4:58 pm CET

Thanks alot! I'd been trying to solve this for about an hour. I knew my page used to work on a mac and couldn't figure out where the change was that had broke it. I was getting despondent and thinking maybe I'd have to start trying to figure out how to debug the flash!
I guess I'd cleaned up some whitespace in my php file or something. After reading this post, I just added a blank line to the end my PHP file and it works! :)

Scott F
Scott F said on Monday, 17 March 2008 at 6:45 pm CET

I am still stuck. It works perfectly fine with IE and firefox (due to some modifications I did)..but now on Macs it gives me an error 302. Im so mad.

Felix
Felix said on Saturday, 14 June 2008 at 11:59 pm CEST

Thanks for this info! Btw i found some sool flash technique on this <a href="http://www.dotarank.com">dota</a> site.

rodrigopoloDOTcom
rodrigopoloDOTcom said on Saturday, 28 June 2008 at 8:30 am CEST

The final solution is that the server script responds '&bError=0&'

in PHP could it be
die('&bError=0&');
echo '&bError=0&'; exit;

etc.

RedPath
RedPath said on Friday, 8 January 2010 at 3:36 pm CET

Thanks for the info!! First post I read and everything works fine it's a miracle!







Solve this simple math problem to prevent bots from spamming this blog:
8 + 7 =