Skip to content

Commit eef273f

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

File tree

1 file changed

+4
-0
lines changed
  • lib/internal/Magento/Framework/File

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Magento\Framework\App\Filesystem\DirectoryList;
1111
use Magento\Framework\App\ObjectManager;
12+
use Magento\Framework\Exception\FileSystemException;
1213
use Magento\Framework\Filesystem;
1314
use \Magento\Framework\Filesystem\DriverInterface;
1415

@@ -62,10 +63,13 @@ public function getNewFileName(string $destinationFile)
6263
}
6364

6465
/**
66+
* Generates new file name until file with provided name doesn't exists
67+
*
6568
* @param DriverInterface $driver
6669
* @param string $fileInfo
6770
* @param int $index
6871
* @return string
72+
* @throws FileSystemException
6973
*/
7074
private function generateFileName($driver, $fileInfo, $index = 1)
7175
{

0 commit comments

Comments
 (0)