Explorar el Código

add internal road to image download

Vincent hace 3 meses
padre
commit
fc0bbaf79f
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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