summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2025-04-10 01:55:33 +0200
committerJulian Hurst <ark@mansus.space>2025-04-10 01:56:15 +0200
commit3548e8f91c86170a29c2e6f20ede914c31358539 (patch)
tree5f1628954f8472668fcdc30537b4496f6a59c674 /main.go
parent51d758f0ccb33567458003a01ddd49e0356f0f61 (diff)
downloadbox-3548e8f91c86170a29c2e6f20ede914c31358539.tar.gz
Fix filename with custom filesPathHEADmaster
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
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()