hugodias / FileUpload

Jquery File Upload for CakePHP 2.x
68 stars 25 forks source link

Problem #8

Closed alexleandrom closed 11 years ago

alexleandrom commented 11 years ago

Hi, I am trying to use this pluging, but when I try to access the start controller I receive this message:

Fatal error: Call to a member function allow() on a non-object in /Users/alexleandro/Sites/picstik/app/Plugin/FileUpload/Controller/FileUploadController.php on line 6

I try to call http://localhost:8888/picstik/file_upload

What could be?

hugodias commented 11 years ago

Hey @alexleandrom . You need to remove this line ( https://github.com/hugodias/FileUpload/blob/master/Controller/FileUploadController.php#L6 ) from your code. This line makes your plugin allowed to any user (only if u're using auth, but looks like you are not using, so you can remove it).

alexleandrom commented 11 years ago

I find,

We need to set the Auth component, because your FileUploadController used this to set allow(*) maybe, we can write a if to check if AutoComponent is

alexleandrom commented 11 years ago

There is on HandleController too