user API: allow to disable writes ...

... even if the user has permissions for these actions
This commit is contained in:
Nicola Murino
2021-07-23 21:41:02 +02:00
parent 85a47810ff
commit 83c7453957
7 changed files with 97 additions and 13 deletions

View File

@@ -181,6 +181,7 @@ func uploadUserFiles(w http.ResponseWriter, r *http.Request) {
sendAPIResponse(w, r, err, "Unable to parse multipart form", http.StatusBadRequest)
return
}
defer r.MultipartForm.RemoveAll() //nolint:errcheck
parentDir := util.CleanPath(r.URL.Query().Get("path"))
files := r.MultipartForm.File["filename"]