Skip to content

Commit 83de22a

Browse files
committed
Fixes after code review
1 parent 251704c commit 83de22a

File tree

1 file changed

+4
-5
lines changed
  • app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery

1 file changed

+4
-5
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,12 @@ public function execute()
9797
$result = $uploader->save(
9898
$mediaDirectory->getAbsolutePath($this->productMediaConfig->getBaseTmpMediaPath())
9999
);
100+
$this->_eventManager->dispatch(
101+
'catalog_product_gallery_upload_image_after',
102+
['result' => $result, 'action' => $this]
103+
);
100104

101105
if (is_array($result)) {
102-
$this->_eventManager->dispatch(
103-
'catalog_product_gallery_upload_image_after',
104-
['result' => $result, 'action' => $this]
105-
);
106-
107106
unset($result['tmp_name']);
108107
unset($result['path']);
109108

0 commit comments

Comments
 (0)