Commit 015e9582 authored by mmn's avatar mmn

MediaFile->getFile() instead of accessing fileRecord

parent 6f410eda
......@@ -79,6 +79,15 @@ class MediaFile
@unlink($filepath);
}
public function getFile()
{
if (!$this->fileRecord instanceof File) {
throw new ServerException('File record did not exist for MediaFile');
}
return $this->fileRecord;
}
protected function storeFile()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment