/**
* Moves the uploaded file into the correctly media directory,
* creates the default thumbnails for image media to display the
* media in the media manager and creates the thumbnails for the
* configured album thumbnail sizes.
*
* @ORM\PrePersist()
*/
public function onSave()
{
// Upload file
$this->uploadFile();
}
/**
* Checks if the name changed, if this is the case, the uploaded file
* has to be renamed.
* Removes the thumbnail files if the album or the name changed.
* Creates the default and album thumbnails if the name or the album changed.
*
* @ORM\PostUpdate()
*/
public function onUpdate()
{