From 2ff0cc80a7495dd75ef7c5ae2942b0e8dddfb1dc Mon Sep 17 00:00:00 2001 From: chrislu Date: Mon, 1 Dec 2025 12:57:25 -0800 Subject: [PATCH] Wire up TUS protocol routes in filer server Add TUS handler route (/.tus/) to the filer HTTP server. The TUS route is registered before the catch-all route to ensure proper routing of TUS protocol requests. TUS protocol is now accessible at: - OPTIONS /.tus/ - Capability discovery - POST /.tus/{path} - Create upload - HEAD /.tus/.uploads/{id} - Get offset - PATCH /.tus/.uploads/{id} - Upload data - DELETE /.tus/.uploads/{id} - Cancel upload --- weed/server/filer_server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go index 95d344af4..a76994b89 100644 --- a/weed/server/filer_server.go +++ b/weed/server/filer_server.go @@ -195,6 +195,8 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) handleStaticResources(defaultMux) if !option.DisableHttp { defaultMux.HandleFunc("/healthz", requestIDMiddleware(fs.filerHealthzHandler)) + // TUS resumable upload protocol handler + defaultMux.HandleFunc("/.tus/", fs.filerGuard.WhiteList(requestIDMiddleware(fs.tusHandler))) defaultMux.HandleFunc("/", fs.filerGuard.WhiteList(requestIDMiddleware(fs.filerHandler))) } if defaultMux != readonlyMux {