Преглед на файлове

add internal road to image download

Vincent преди 3 месеца
родител
ревизия
fc0bbaf79f
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  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