From 72219eb59ca2fc188401514535cfb8bb4ffcbe0a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 19 Jan 2024 17:08:55 -0500 Subject: [PATCH] feat: add tus endpoints --- api/s5.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/s5.go b/api/s5.go index 6373b8e..4f5f76a 100644 --- a/api/s5.go +++ b/api/s5.go @@ -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/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 "GET /s5/blob/:cid": middleware.AuthMiddleware(h.DownloadBlob, portal), "GET /s5/metadata/:cid": h.DownloadMetadata,