Skip to content

Commit

Permalink
Fixes issue with non existing file, when adding image to gallery with…
Browse files Browse the repository at this point in the history
… move option. Fix for magento#21978
  • Loading branch information
dudzio12 authored and amol2jcommerce committed May 2, 2019
1 parent 1cc6e75 commit 008f8ef
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function addImage(
$mediaGalleryData = $product->getData($attrCode);
$position = 0;

$absoluteFilePath = $this->mediaDirectory->getAbsolutePath($file);
$absoluteFilePath = $this->mediaDirectory->getAbsolutePath($destinationFile);
$imageMimeType = $this->mime->getMimeType($absoluteFilePath);
$imageContent = $this->mediaDirectory->readFile($absoluteFilePath);
$imageBase64 = base64_encode($imageContent);
Expand Down

0 comments on commit 008f8ef

Please sign in to comment.