소스 검색

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