Procházet zdrojové kódy

add internal road to image download

Vincent před 3 měsíci
rodič
revize
fc0bbaf79f
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. 5 0
      src/ApiResources/Core/File/Image.php

+ 5 - 0
src/ApiResources/Core/File/Image.php

@@ -23,6 +23,11 @@ use Symfony\Component\Validator\Constraints as Assert;
             security: 'is_granted("ROLE_FILE")',
             provider: ImageProvider::class
         ),
+        new Get(
+            uriTemplate: '/internal/image/download/{fileId}/{size}',
+            requirements: ['fileId' => '\\d+', 'size' => new EnumRequirement(FileSizeEnum::class)],
+            provider: ImageProvider::class
+        ),
     ]
 )]
 class Image