/** * @param UploadedFile $uploaded_file * @return array Uploaded file info * @throws FileManagerException */ public function upload(UploadedFile $uploaded_file) { if ($uploaded_file->isValid()) { $file = $this->file->uploading($uploaded_file); $this->uniqueName->file($file); $uploaded_file->move($file->dirPath(), $file->fullName()); if ($file->isImage()) { $this->thumb->create($file); $file->setFileThumb(); } return (array) $file->details(); } throw new FileManagerException($this, 'err_file_upload_invalid_file'); }