Uploadify is a great tool. I'm using it so that people can mass upload photos for a photo gallery app I'm working on. This afternoon I've spent about 3-4 hours trying to get it to work on Windows (IE, Chrome, Firefox). It wasn't easy but I think I got it working in the end.

Pitfall no 1 (easy)

The Javascript code that "wraps" the "uploader.swf" had a bug in how it calculated the installed Flash version in IE (only tested in IE6). So I fixed that and will shortly send a patch to the uploadify.com.

Pitfall no 2 (hard)

I've got nginx on the server passing requests to a Django daemon via FCGI. For some obscure reason, on Windows, if the file uploader.swf was served as a static file directly from nginx it wouldn't work and I would get 403 errors that are never explained in the nginx error log or anything. So I changed it to let Django serve up the uploader.swf file which obviously sets headers differently and then it worked.

Headers when served directly by nginx:

HTTP/1.1 200 OK
Server: nginx/0.6.34
Date: Fri, 17 Jul 2009 17:01:09 GMT
Content-Type: application/x-shockwave-flash
Content-Length: 18659
Last-Modified: Wed, 08 Jul 2009 12:29:52 GMT
Connection: keep-alive
Accept-Ranges: bytes

Headers when served from Django (django.views.static.serve):

HTTP/1.1 200 OK
Server: nginx/0.6.34
Date: Fri, 17 Jul 2009 17:01:03 GMT
Content-Type: application/x-shockwave-flash
Connection: keep-alive
Last-Modified: Wed, 08 Jul 2009 12:29:52 GMT
Content-Length: 18659
Vary: Cookie

Pitfall no 3 (super complex)

It was working in Firefox Linux, Safari Mac, Firefox Mac but not IE6 Windows, Firefox Windows or Chrome Windows. This despite having the latest (and same as Linux) version of Flash (10.0.22.x)!

Solution: In Internet Explorer, click on Options and delete the cookies, temporary Internet files and Clear History (for good measure). Now it works!!

It's been a hell of a journey but now it's crossed. Let's hope I can save some other poor sucker a couple of hours by making this blog available.

UPDATE

ow it's stopped working again. Works in Opera Windows but not IE 8 in windows 7. Grr...!

UPDATE 2

I've completely abandoned Uploadify now and instead gone for Swfupload which actually works really well.

Fabian Tollenaar - 19 July 2009 [«« Reply to this]
Why not use Google Gears.
Gears doesn't use 'broken' headers like flash does, but allows for multi uploads!

I've got a working example, email me if you'd like to have it. Working on a jQuery plugin as well, but that one isn't finished yet ;-)
Peter Bengtsson - 20 July 2009 [«« Reply to this]
Interesting, but won't it installation of the Google Gears plugin for the client?

By the way, I've given up on uploadify and gone for swfupload now instead which works much better.
Fabian Tollenaar - 20 July 2009 [«« Reply to this]
Good choice... Uploadify just isn't flexible enough for most coders. But you're right that Google Gears requires users to install another plugin, but it gives lots of features flash just doesn't implement. For instance, Gears isn't bound to PHP's default upload limit per file, and it's possible to make pausable and resumable uploads over multiple browser sessions...

take a look at http://uploadmovietool.appspot.com/ for a great example!

What's you're e-mail address, so I can e-mail you the code I'm working on.. It isn't so advanced, but makes it a lot easier to understand it's basic logic...

-- Fabian
Peter Bengtsson - 20 July 2009 [«« Reply to this]
The install requirement is a show-stopper for this app but when I build something more advanced for a targeted audience I'll come back to your google code page. Thanks!
Hardt - 27 July 2009 [«« Reply to this]
I'm using uploadify too, but I'm not very satisfied with it.
I think I'll try SWFUpload (sorry Fabian, cannot afford to install plugins for this webapp)
Al - 12 August 2009 [«« Reply to this]
Thanks for your post! I thought I'm the only one struggling with different issues on uploadify.
Ok, now let's turn to swfupload. Hope it'll be better...
Veer - 01 February 2010 [«« Reply to this]
I've actually switched from swfupload to uploadify and I really hope I've made a good choice this time! I followed all the best practices and workarounds for known issues, but just couldn't get swfupload to work on FireFox.

The current version of Uploadify is working well for me. However, I came upon this thread today because it has suddenly stopped working on FF (Windows and Mac) for me. Trying to trace the issue and I know it's going to take long, so wish me luck.

By the way, I've noticed that a lot of issues browser-related in Uploadify stem from the way custom functions are written.
Slavi - 05 March 2010 [«« Reply to this]
I've had frustrations with Uploadify too.
I had to pass the session ID through the link of my Zend Framework links.
Zend debugger cannot debug uploadify upload requests.
gondo - 06 April 2010 [«« Reply to this]
hi
i am using Zend Framework Uploadify Extension.
more info on http://gondo.webdesigners.sk/zend-framework-uploadify-extension/

.gondo
Alfonso - 04 August 2010 [«« Reply to this]
I've just gone mad with uploadify.
It doesn't work in IE8 once my framework initiates the session!!!!!
Finger crossed with your suggestion


Your email will never ever be published