Refactor: file api in to seperate api app & use drf api views
This commit is contained in:
parent
1f75b1bf17
commit
bd2791c155
6 changed files with 150 additions and 71 deletions
9
backend/api/files/urls.py
Normal file
9
backend/api/files/urls.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from django.urls import path
|
||||
from .views import FileServeView, FileDetailView
|
||||
|
||||
urlpatterns = [
|
||||
# Serve the actual file
|
||||
path("files/<str:file_hash>/", FileServeView.as_view(), name="serve_file"),
|
||||
# Get file metadata
|
||||
path("files/<str:file_hash>/info/", FileDetailView.as_view(), name="file_info"),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue