fix: use uuid v4 for filenames to enable distribution to folders
This commit is contained in:
1 parent
b8c65fe57d
commit
3c57ff7af8
1 file changed
+1
-1
@@ -10,7 +10,7 @@ class UploadNamer implements NamerInterface
|
|||||||
{
|
{
|
||||||
public function name(FileInterface $file): string
|
public function name(FileInterface $file): string
|
||||||
{
|
{
|
||||||
$fileUuid = Uuid::v7();
|
$fileUuid = Uuid::v4();
|
||||||
$folder = substr($fileUuid, 0, 1);
|
$folder = substr($fileUuid, 0, 1);
|
||||||
|
|
||||||
return sprintf('%s/%s.%s', $folder, $fileUuid, strtolower($file->getExtension()));
|
return sprintf('%s/%s.%s', $folder, $fileUuid, strtolower($file->getExtension()));
|
||||||
|
|||||||
Reference in new issue
Block a user