Skip to content

Commit

Permalink
ENGCOM-5016: [Backport] Non existing file, when adding image to galle…
Browse files Browse the repository at this point in the history
…ry with move option. Fix for #21978 #22579
  • Loading branch information
sidolov authored May 3, 2019
2 parents afb2e78 + 0e7c329 commit ad15ec1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/Model/Product/Gallery/Processor.php
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 Expand Up @@ -489,7 +489,7 @@ protected function getNotDuplicatedFilename($fileName, $dispretionPath)
/**
* Retrieve data for update attribute
*
* @param \Magento\Catalog\Model\Product $object
* @param \Magento\Catalog\Model\Product $object
* @return array
* @since 101.0.0
*/
Expand Down

0 comments on commit ad15ec1

Please sign in to comment.