fix: use uuid v4 for filenames to enable distribution to folders
This commit is contained in:
@@ -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