diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 3f4773b..19aa398 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -79,11 +79,7 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) { if leftSpace < fHandler.Size { log.Println("not enough space left in storage, only", leftSpace>>20, "MiB left") - if strings.Contains(r.UserAgent(), "curl") || strings.Contains(r.UserAgent(), "Wget") { - http.Error(w, "Not enough space left, sorry", http.StatusInternalServerError) - } else { - web.ErrorXXX(utils.MainSite(r.Host), http.StatusInternalServerError, "Not enough space left, sorry.", w) - } + Error(w, r, http.StatusInternalServerError, "Not enough space left, sorry.") return }