phpzend-frameworkroutesswfupload

SWFUpload (Flash file upload) and routed URLs in Zend Framework (Mac Issue)


This gets quite specific in regard of the combination of technologies used, so I don't expect a lot of direct answers, but I have to try nonetheless.

This is (supposedly) an exclusively Mac issue with Flash Player in that it does not recognize routes (see here: http://demo.swfupload.org/Documentation/ under Mac issues, point 2). I know what you're thinking: "Mac?! For coding?! Bwaahaha!", and I concur. However, it is the weapon of choice of my employers due to cheapness when it comes to bundled software and I am forced to hack away on this shame of a machine.

I am using SWFUpload to display a fancy progress bar for users, and am stuck on sending the file to the controller - it always yields a 302 error in the debug window. If I, however, change the upload script target in the SWFUpload settings object to an absolute path to a script, everything works fine. Also, the file upload form works perfectly ok if there is no Flash overlay present, that is, if it simply POSTs to a route - just in case you're wondering.

Has anyone else encountered this problem, and if so, how have you solved it? I guess I could place a swfupload.php script somewhere and have that receive a file, then have IT send the file forth to a controller, but it seems like a very dirty workaround.

It's a bit vague, I know, if I can do anything to clarify further, please ask. Thank you

Edit: I should mention, this applies to local development only. As soon as I upload the code to our Linux server, the routes are a-ok and the file goes through. So if anyone has the solution for this local dev environment problem, it would be much appreciated.


Solution

  • Shame and regret, shame and regret! I am sorry for wasting everyone's time - it turns out I had forgotten to send and set the Session ID, which caused my Acl to redirect, which caused the 302. I failed to see all this because the debug simply says 302. Sigh! Anyway, consider this question closed - everything works fine :)