Fix file upload

This commit is contained in:
2025-10-28 18:58:10 +01:00
parent c11d956ced
commit de06939b01
3 changed files with 19 additions and 4 deletions

View File

@@ -410,7 +410,8 @@ func (h *Handler) UploadFile() http.HandlerFunc {
}
}()
filePath := decodedPath + "/" + formFile.Filename
// Use filepath.Join to properly construct the path
filePath := filepath.Join(decodedPath, formFile.Filename)
content, err := io.ReadAll(file)
if err != nil {