diff --git a/app/code/community/Pimgento/Api/Helper/Image.php b/app/code/community/Pimgento/Api/Helper/Image.php index b2d92e8..947f5c2 100644 --- a/app/code/community/Pimgento/Api/Helper/Image.php +++ b/app/code/community/Pimgento/Api/Helper/Image.php @@ -77,6 +77,9 @@ public function saveMediaFile($name, $binary) $ioAdapter->open(['path' => dirname($path)]); $ioAdapter->streamOpen(basename($path)); - return $ioAdapter->streamWrite($binary); + $steamWrite = $ioAdapter->streamWrite($binary); + $ioAdapter->close(); + + return $steamWrite; } }