From 3548e8f91c86170a29c2e6f20ede914c31358539 Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Thu, 10 Apr 2025 01:55:33 +0200 Subject: Fix filename with custom filesPath --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 964fbb1..df415b8 100644 --- a/main.go +++ b/main.go @@ -116,7 +116,7 @@ func (handler BoxHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusUnauthorized) return } - filename := r.Header.Get("X-ResourceMeta-Filename") + filename := filepath.Join(handler.filesPath, r.Header.Get("X-ResourceMeta-Filename")) if filename == "" { ext := r.Header.Get("X-ResourceMeta-Extension") u, err := uuid.NewRandom() -- cgit v1.2.3