Skip to content

Commit 0e7c329

Browse files
ENGCOM-5016: [Backport] Non existing file, when adding image to gallery with move option. Fix for #21978 #22579
- Merge Pull Request #22579 from amol2jcommerce/magento2:2.2-develop-PR-port-22020 - Merged commits: 1. 008f8ef 2. e97f14c
2 parents 1cc6e75 + e97f14c commit 0e7c329

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
@@ -191,7 +191,7 @@ public function addImage(
191191
$mediaGalleryData = $product->getData($attrCode);
192192
$position = 0;
193193

194-
$absoluteFilePath = $this->mediaDirectory->getAbsolutePath($file);
194+
$absoluteFilePath = $this->mediaDirectory->getAbsolutePath($destinationFile);
195195
$imageMimeType = $this->mime->getMimeType($absoluteFilePath);
196196
$imageContent = $this->mediaDirectory->readFile($absoluteFilePath);
197197
$imageBase64 = base64_encode($imageContent);
@@ -489,7 +489,7 @@ protected function getNotDuplicatedFilename($fileName, $dispretionPath)
489489
/**
490490
* Retrieve data for update attribute
491491
*
492-
* @param \Magento\Catalog\Model\Product $object
492+
* @param \Magento\Catalog\Model\Product $object
493493
* @return array
494494
* @since 101.0.0
495495
*/

0 commit comments

Comments
 (0)