Skip to content

Commit 5869b40

Browse files
committed
feat: add fullUrl to the return array in the image download processor
1 parent f90eaa7 commit 5869b40

File tree

1 file changed

+5
-2
lines changed
  • core/components/modai/src/Processors/Download

1 file changed

+5
-2
lines changed

core/components/modai/src/Processors/Download/Image.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Image extends Processor {
1414
public function process() {
1515
$url = $this->getProperty('url');
1616
$image = $this->getProperty('image');
17-
$field = $this->getProperty('fieldName', '');
17+
$field = $this->getProperty('field', '');
1818
$namespace = $this->getProperty('namespace', 'modai');
1919
$resource = (int)$this->getProperty('resource', 0);
2020
$mediaSource = (int)$this->getProperty('mediaSource', 0);
@@ -74,7 +74,10 @@ public function process() {
7474

7575
$source->createObject($filePath[0], $filePath[1], $image);
7676

77-
return $this->success('', ['url' => $filePath[0].$filePath[1]]);
77+
return $this->success('', [
78+
'url' => $filePath[0].$filePath[1],
79+
'fullUrl' => $source->getObjectUrl($filePath[0].$filePath[1])
80+
]);
7881
}
7982

8083
private function createFilePath($path, $resource): array

0 commit comments

Comments
 (0)