diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index a307cf7..fedc346 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -181,7 +181,13 @@ func (h *UploadHandlers) Download(w http.ResponseWriter, r *http.Request) { } func (h *UploadHandlers) Delete(w http.ResponseWriter, r *http.Request) { - saltedHash := server.GetURLParam(r, "hash") + var saltedHash string + if r.Method == "DELETE" { + saltedHash = server.GetURLParam(r, "hash") + } else { + r.ParseForm() + saltedHash = r.FormValue("hash") + } path := path.Join(h.conf.Uploads.Directory, saltedHash)