Skip to content

Commit 8e1ec29

Browse files
ENGCOM-4786: PUT /V1/products/:sku/media/:entryId does not change the file #22424
- Merge Pull Request #22424 from Nazar65/magento2:issue-22402 - Merged commits: 1. 9205c6f
2 parents 9312b47 + 9205c6f commit 8e1ec29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ public function update($sku, ProductAttributeMediaGalleryEntryInterface $entry)
105105

106106
if ($existingEntry->getId() == $entry->getId()) {
107107
$found = true;
108-
if ($entry->getFile()) {
108+
109+
$file = $entry->getContent();
110+
111+
if ($file && $file->getBase64EncodedData() || $entry->getFile()) {
109112
$entry->setId(null);
110113
}
111114
$existingMediaGalleryEntries[$key] = $entry;

0 commit comments

Comments
 (0)