feat: implement file renaming

This commit is contained in:
2024-09-17 12:34:35 +07:00
parent cd9a7503b5
commit f52e75db78
10 changed files with 461 additions and 189 deletions

View File

@ -32,7 +32,7 @@ func PUT(w http.ResponseWriter, r *http.Request) {
app.Server.Logger.Error(err.Error())
return
}
saveFolder := filepath.Join("uploads", userSession.UserID.String(), file.ID.String(), file.Name)
saveFolder := filepath.Join("uploads", userSession.UserID.String(), file.ID.String())
pattern := fmt.Sprintf("%s/chunk_*", saveFolder)
chunkFiles, err := filepath.Glob(pattern)