Compare commits

..

2 Commits

Author SHA1 Message Date
Henrique Dias
5b7ea9f95a
chore(release): 2.40.2 2025-07-17 18:09:15 +02:00
Henrique Dias
607f5708a2
fix: Location header on TUS endpoint (#5302) 2025-07-17 18:06:59 +02:00
2 changed files with 18 additions and 2 deletions

View File

@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [2.40.2](https://github.com/filebrowser/filebrowser/compare/v2.40.1...v2.40.2) (2025-07-17)
### Bug Fixes
* Location header on TUS endpoint ([#5302](https://github.com/filebrowser/filebrowser/issues/5302)) ([607f570](https://github.com/filebrowser/filebrowser/commit/607f5708a2484428ab837781a5ef26b8cc3194f4))
### Build
* **deps:** bump vue-i18n from 11.1.9 to 11.1.10 in /frontend ([d61110e](https://github.com/filebrowser/filebrowser/commit/d61110e4d7155a5849557adf3b75dc0191f17e80))
### [2.40.1](https://github.com/filebrowser/filebrowser/compare/v2.40.0...v2.40.1) (2025-07-15) ### [2.40.1](https://github.com/filebrowser/filebrowser/compare/v2.40.0...v2.40.1) (2025-07-15)

View File

@ -6,6 +6,7 @@ import (
"fmt" "fmt"
"io" "io"
"net/http" "net/http"
"net/url"
"os" "os"
"path/filepath" "path/filepath"
"strconv" "strconv"
@ -147,9 +148,12 @@ func tusPostHandler() handleFunc {
// Enables the user to utilize the PATCH endpoint for uploading file data // Enables the user to utilize the PATCH endpoint for uploading file data
registerUpload(file.RealPath(), uploadLength) registerUpload(file.RealPath(), uploadLength)
// Signal the frontend to reuse the current request URL path, err := url.JoinPath("/", d.server.BaseURL, "/api/tus", r.URL.Path)
w.Header().Set("Location", "") if err != nil {
return http.StatusBadRequest, fmt.Errorf("invalid path: %w", err)
}
w.Header().Set("Location", path)
return http.StatusCreated, nil return http.StatusCreated, nil
}) })
} }