czk 4 vuotta sitten
vanhempi
commit
77e8061178
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      http/handle.go

+ 7 - 1
http/handle.go

@@ -3,6 +3,7 @@ package http
 import (
 	"bytes"
 	json2 "encoding/json"
+	"fmt"
 	"image"
 	"io/ioutil"
 	"net/http"
@@ -66,10 +67,15 @@ func parseForm(req *http.Request, v interface{}) error {
 			if err != nil {
 				return err
 			}
-			if img, _, err := image.Decode(f); err == nil {
+			fmt.Println("70")
+			img, _name, _err := image.Decode(f)
+			fmt.Printf("72 %v \n %v \n %v\n", img, _name, _err)
+			if _err == nil {
+
 				value[k1+"Height"] = img.Bounds().Max.Y
 				value[k1+"Wide"] = img.Bounds().Max.X
 			}
+			fmt.Println("75")
 			value[k1] = buf.Bytes()
 			value[k1+"Filename"] = v1[0].Filename
 		}