Skip to content

Commit a87370e

Browse files
committed
B2B-2058: ImageUploader uses Name class which works only with local FS
1 parent 2152673 commit a87370e

File tree

2 files changed

+6
-3
lines changed
  • app/code/Magento/RemoteStorage/etc
  • lib/internal/Magento/Framework/File

2 files changed

+6
-3
lines changed

app/code/Magento/RemoteStorage/etc/di.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@
9696
<argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
9797
</arguments>
9898
</type>
99+
<type name="Magento\Framework\File\Name">
100+
<arguments>
101+
<argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
102+
</arguments>
103+
</type>
99104
<type name="Magento\Framework\Image\Adapter\AbstractAdapter">
100105
<plugin name="remoteImageFile" type="Magento\RemoteStorage\Plugin\Image" sortOrder="10"/>
101106
</type>

lib/internal/Magento/Framework/File/Name.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ public function getNewFileName(string $destinationFile)
5555
}
5656

5757
if ($driver->isExists($destinationFile)) {
58-
$destFileName = $this->generateFileName($driver, $fileInfo);
58+
return $this->generateFileName($driver, $fileInfo);
5959
} else {
6060
return $fileInfo['basename'];
6161
}
62-
63-
return $destFileName;
6462
}
6563

6664
/**

0 commit comments

Comments
 (0)