Browse Source

adding exception handling for this case

pull/2/head
Chris Lu 12 years ago
parent
commit
084e0ab7bb
  1. 7
      weed-fs/src/pkg/storage/needle.go

7
weed-fs/src/pkg/storage/needle.go

@ -32,7 +32,12 @@ func NewNeedle(r *http.Request) (n *Needle, fname string, e error) {
e = fe
return
}
part, _ := form.NextPart()
part, fe := form.NextPart()
if fe != nil {
fmt.Println("Reading Multi part [ERROR]", fe)
e = fe
return
}
fname = part.FileName()
data, _ := ioutil.ReadAll(part)
//log.Println("uploading file " + part.FileName())

Loading…
Cancel
Save