|
|
@@ -11,14 +11,13 @@ use App\Enum\Core\FileStatusEnum;
|
|
|
use App\Enum\Core\FileTypeEnum;
|
|
|
use App\Repository\Access\AccessRepository;
|
|
|
use App\Service\Utils\Path;
|
|
|
+use App\Service\Utils\Uuid;
|
|
|
use DateTime;
|
|
|
use Doctrine\ORM\EntityManagerInterface;
|
|
|
-use Exception;
|
|
|
use Gaufrette\Filesystem;
|
|
|
use JetBrains\PhpStorm\Pure;
|
|
|
use Knp\Bundle\GaufretteBundle\FilesystemMap;
|
|
|
use Mimey\MimeTypes;
|
|
|
-use Ramsey\Uuid\Uuid;
|
|
|
use RuntimeException;
|
|
|
|
|
|
/**
|
|
|
@@ -158,8 +157,7 @@ class FileStorage
|
|
|
$file->getType()
|
|
|
);
|
|
|
|
|
|
- /** @noinspection PhpUnhandledExceptionInspection */
|
|
|
- $uid = date('Ymd_His') . '_' . substr(Uuid::uuid4()->toString(), 0, 5);
|
|
|
+ $uid = date('Ymd_His') . '_' . Uuid::uuid(5);
|
|
|
|
|
|
$key = Path::join($prefix, $uid, $file->getName());
|
|
|
} else {
|