Skip to content

Commit 008f8ef

Browse files
dudzio12amol2jcommerce
authored andcommitted
Fixes issue with non existing file, when adding image to gallery with move option. Fix for #21978
1 parent 1cc6e75 commit 008f8ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
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);

0 commit comments

Comments
 (0)