302 error in CakePHP with SWFUpload


I encountered this issue in a recent project.

Basically I use SWFUpload to post files to a CakePHP controller. It worked beautifully, until I removed this one line in beforeFilter():


I was using the Auth component, and without the line above to allow unauthenticated access to the controller action, then we have a problem.

Hope this helps somebody then.