1
votes

I am trying to learn about David Persson's CakePHP Media Plugin through the included tutorial.

I get to the point where I can debug $this->data and it shows the 'file' array with the plugin's added keys (name, size and type) and I've added var $actsAs = array('Media.Transfer'); to the model of my choice. The problem is, at this point when I submit the form, it should be uploading the file to the app/webroot/media/transfers, but it is not doing that.

Could the problem be that I haven't added any controller code or is that taken care of by asserting that var $actsAs = array('Media.Transfer');? Any other ideas? Do you need to see any code to diagnose the problem?

1
Is app/webroot/media/transfers writable by apache or whatever web server you're running? - Tyler
Yes, I've chmodded it to be 775. - conbask

1 Answers

0
votes

You need to also use the Media.Coupler behavior.

var $actsAs = array('Media.Transfer', 'Media.Coupler');