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 #21978
  • Loading branch information
dudzio12 committed Mar 28, 2019
1 parent 77297a1 commit 103c28b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,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 103c28b

Please sign in to comment.