From a6d5ca914195d64f3411c64fd51180a271a2890c Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 5 Jan 2018 23:39:41 +0100 Subject: [PATCH] FIX specify upload enctype --- http.go | 3 ++- res/templates/upload.html.tmpl | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/http.go b/http.go index 6d7adc0..d813b0c 100644 --- a/http.go +++ b/http.go @@ -156,7 +156,8 @@ func (mu *MegaUploader) upload(w http.ResponseWriter, r *http.Request) { } err = r.ParseMultipartForm(int64(sizelimit)) if err != nil { - http.Error(w, "Bad request", http.StatusBadRequest) + fmt.Fprintln(os.Stderr, err) + http.Error(w, "Bad request: error parsing form", http.StatusBadRequest) return } file, header, err := r.FormFile("file") diff --git a/res/templates/upload.html.tmpl b/res/templates/upload.html.tmpl index 675693e..ba41834 100644 --- a/res/templates/upload.html.tmpl +++ b/res/templates/upload.html.tmpl @@ -23,8 +23,8 @@

-    
-