create file API v2 and X-Accel-Redirect endpoint for images

This commit is contained in:
j3d1 2024-01-07 21:06:06 +01:00
parent ab5e8f36d1
commit 77828295f8
10 changed files with 164 additions and 1 deletions

View file

@ -16,6 +16,8 @@ class FileViewSet(viewsets.ModelViewSet):
serializer_class = FileSerializer
queryset = File.objects.all()
lookup_field = 'hash'
permission_classes = []
authentication_classes = []
router = routers.SimpleRouter(trailing_slash=False)