mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Fix file upload
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user