Hi Alberto,

Given you're using the coupler behavior  and you replace a file but leave 
its corresponding record in tact, the file which gets replaced won't be 
deleted. This is by design. It is expected that when replacing a file you 
would rather go and delete the complete old record. Than create a new record 
with a new file associated with it. In the scenario described your old file 
would get deleted as the beforeDelete hook of the coupler behavior gets 
triggered and takes care of that.

Now to the versions of the file. I've removed support for automatically 
deleting versions of a file in the current version of the media plugin. It 
turned out that how, which and when to delete the generated versions is 
highly application specific. However you can still take care of that 
yourself for example in the before or afterDelete of your "file" model. See 
https://gist.github.com/859371 for an example.

- David



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to