diff --git a/src/Processor.php b/src/Processor.php index 42351d0..9983dfc 100644 --- a/src/Processor.php +++ b/src/Processor.php @@ -194,7 +194,7 @@ public function setDirectoryTreeReader(DirectoryTreeReader $directoryTreeReader) * * @param UploadedFile $uploadedFile * @param string $context - * @return \Exception + * @return \Exception|string */ public function upload(UploadedFile $uploadedFile, $context) { @@ -202,6 +202,8 @@ public function upload(UploadedFile $uploadedFile, $context) $fileName = $this->uploadImage($uploadedFile, $context); $this->processImage($context, $fileName); + + return $fileName; } catch (\Exception $e) { $this->getDeleteImageHandler()->deleteImage($context, $fileName);