feat: add tus endpoints

This commit is contained in:
Derrick Hammer 2024-01-19 17:08:55 -05:00
parent 2e64b56115
commit 72219eb59c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,12 @@ func getRoutes(h *s5.HttpHandler, portal interfaces.Portal) map[string]jape.Hand
"POST /s5/upload": middleware.AuthMiddleware(h.SmallFileUpload, portal), "POST /s5/upload": middleware.AuthMiddleware(h.SmallFileUpload, portal),
"POST /s5/upload/directory": middleware.AuthMiddleware(h.DirectoryUpload, portal), "POST /s5/upload/directory": middleware.AuthMiddleware(h.DirectoryUpload, portal),
// Tus API
"POST /s5/upload/tus": tusHandler,
"HEAD /s5/upload/tus/:id": tusHandler,
"POST /s5/upload/tus/:id": tusHandler,
"PATCH /s5/upload/tus/:id": tusHandler,
// Download API // Download API
"GET /s5/blob/:cid": middleware.AuthMiddleware(h.DownloadBlob, portal), "GET /s5/blob/:cid": middleware.AuthMiddleware(h.DownloadBlob, portal),
"GET /s5/metadata/:cid": h.DownloadMetadata, "GET /s5/metadata/:cid": h.DownloadMetadata,