Skip to content

Commit d7684c0

Browse files
authored
ENGCOM-4838: Non existing file, when adding image to gallery with move option. Fix for #21978 #22020
2 parents ac1fd7f + 723d8ad commit d7684c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Catalog/Model/Product/Gallery/Processor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function addImage(
196196
$mediaGalleryData = $product->getData($attrCode);
197197
$position = 0;
198198

199-
$absoluteFilePath = $this->mediaDirectory->getAbsolutePath($file);
199+
$absoluteFilePath = $this->mediaDirectory->getAbsolutePath($destinationFile);
200200
$imageMimeType = $this->mime->getMimeType($absoluteFilePath);
201201
$imageContent = $this->mediaDirectory->readFile($absoluteFilePath);
202202
$imageBase64 = base64_encode($imageContent);
@@ -494,7 +494,7 @@ protected function getNotDuplicatedFilename($fileName, $dispretionPath)
494494
/**
495495
* Retrieve data for update attribute
496496
*
497-
* @param \Magento\Catalog\Model\Product $object
497+
* @param \Magento\Catalog\Model\Product $object
498498
* @return array
499499
* @since 101.0.0
500500
*/

0 commit comments

Comments
 (0)