diff --git a/README.md b/README.md new file mode 100644 index 0000000..eed7962 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Installation + +`composer require psys/symfony-utils` + + +## Add this to services.yaml: + +``` +Psys\SymfonyUtils\FormErrors: + autowire: true +Psys\SymfonyUtils\FileUploader: + autowire: true +``` + diff --git a/src/FileUploader.php b/src/FileUploader.php index 356ac4b..a6ff373 100644 --- a/src/FileUploader.php +++ b/src/FileUploader.php @@ -99,7 +99,7 @@ private function stripMetadata ($fileAbsPath, $mimeType, $extension) // $pages = (int)$imagick->getNumberImages(); // Save all pages as temporary JPGs - $absCestyTemp = []; + $absPathsTemp = []; foreach ($imagick as $i => $im) { // $im->setImageFormat('jpeg'); @@ -116,13 +116,13 @@ private function stripMetadata ($fileAbsPath, $mimeType, $extension) } $im->writeImage($absPath); - $absCestyTemp[] = $absPath; + $absPathsTemp[] = $absPath; } // $imagick->clear(); // New PDF from temporary JPGs - $imagick = new \Imagick($absCestyTemp); + $imagick = new \Imagick($absPathsTemp); $imagick->setImageFormat('pdf'); $imagick->writeImages($fileAbsPath, true); $imagick->clear(); @@ -130,7 +130,7 @@ private function stripMetadata ($fileAbsPath, $mimeType, $extension) // Remove temporary JPGs try { - $this->filesystem->remove($absCestyTemp); + $this->filesystem->remove($absPathsTemp); } catch (IOExceptionInterface $exception) {