I have a kohana3.0 content and files management system, and I would like to be able to completely delete images from database, and from my folder where I have uploaded them, when a user deletes an image. Now I use for image deletion:
public function delete($id = NULL)
{
parent::delete($id);
unlink($this->path);
}
this in the image model. But it doesn't actually delete my image at all.
How can an image file be deleted in kohana 3.0?
I have no idea about kohana, but the unlink() function is how files are deleted in PHP. If this isn't working, it is possible you just have a permissions problem with those files.