@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()
{
' partially uploaded.'));
case UPLOAD_ERR_NO_FILE:
// No file; probably just a non-AJAX submission.
- return;
+ throw new NoUploadedMediaException($param);
case UPLOAD_ERR_NO_TMP_DIR:
// TRANS: Client exception thrown when a temporary folder is not present to store a file upload.
throw new ClientException(_('Missing a temporary folder.'));