Saturday, December 21, 2013

Initiating a 'DELETE' or 'POST' in a folder inside webroot

Hi,

I am using the fileupload jquery library. I was able to get everything working and migrated some functions to the controllers to make it compatible.

The problem I am encountering is that fileupload is creating a 'Delete' button which goes to the link below:
http://localhost/homsite/app/webroot/?file=SAMPLE%PICTURE.JPG

The button's property is data-type="DELETE"

Basically what this should do is initiate a DELETE in the 'file' folder to remove "SAMPLE PICTURE.JPG"

I have tried this with a plain PHP setup and it is working fine.

Looking at the error returned, cakephp is routing the link to the controller:

Missing Method in AppController

Error: The action webroot is not defined in controller AppController

Error: Create AppController::webroot() in file: app\Controller\AppController.php.

<?php  class AppController extends AppController {      	public function webroot() {    	}    }


Is it possible to make cakephp exempt the MVC for that particular link?

Thank you!






--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: