fix memory footprint

This commit is contained in:
islys 2026-04-29 11:55:18 +02:00
parent 32fdbc4c74
commit 6e1a92f112

View file

@ -49,7 +49,11 @@ class ImageUploader implements ImageUploaderInterface
$image->setPath($path);
$this->filesystem->write($image->getPath(), file_get_contents($file->getPathname()));
$stream = fopen($file->getPathname(), 'r');
$this->filesystem->writeStream($image->getPath(), $stream);
if (is_resource($stream)) {
fclose($stream);
}
}
public function remove(string $path): bool