|
|
|
@ -725,9 +725,9 @@ func uploadFileHandler(writer http.ResponseWriter, req *http.Request) {
|
|
|
|
|
|
|
|
|
|
if req.Form["files"] != nil { |
|
|
|
|
for i := 0; i < len(req.Form["files"]); i++ { |
|
|
|
|
log.Info("File-Name:", req.FormValue("files[i].name")) |
|
|
|
|
log.Info("File-Name:", req.FormValue("files.name")) |
|
|
|
|
|
|
|
|
|
file, handler, err := req.FormFile("files[i]") |
|
|
|
|
file, handler, err := req.FormFile("files") |
|
|
|
|
if err != nil { |
|
|
|
|
panic(err) //dont do this
|
|
|
|
|
} |
|
|
|
@ -758,6 +758,7 @@ func uploadFileHandler(writer http.ResponseWriter, req *http.Request) {
|
|
|
|
|
if len(pho) == 0 { |
|
|
|
|
log.Fatal("Error: Size of Array = 0") |
|
|
|
|
writer.WriteHeader(http.StatusInternalServerError) |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
for i := 0; i < len(pho); i++ { |
|
|
|
|