302 error in CakePHP with SWFUpload
- July 1st, 2009
- Posted in Wayne Khan
- By Wayne Khan
- Write comment
I encountered this issue in one of my recent projects.
Basically I use SWFUpload to post files to a CakePHP controller. It was working beautifully, until I inadvertently removed 1 (yes, just one) line of code in beforeFilter():
$this->Auth->allow("swfupload");
I was using the Auth component, and without the line above to allow “not logged in” access to the controller action, then we have a problem.
Hope this helps somebody.
Thank you! Was banging my head against the wall for hours with a similar problem.
Codeigniter FTW!!
Haha. CodeIgniter is a competent framework for small (< 10 objects) systems. Any larger, and it gets difficult to retrieve data + associations in a succinct way!