I’ve never used the multipart reader, but looking at this piece of logic

var uploadFile *multipart.Part
    for {
        p, err := fr.NextPart()
        if err == io.EOF {
            break
        }
        if err != nil {
            log.Fatal(err)
        }
        if err != nil {
            log.Fatal(err)
        }
        if p.FormName() == "uploadfile" {
            uploadFile = p
            fmt.Println("UploadFile: ", uploadFile)
        }
    }

It seems to me that the loop will only exit when fr.NextPart returns io.EOF ( 
all other cases will cause your program to exit). The example from godoc has a 
suggestion for how to process the uploaded file 
https://golang.org/pkg/mime/multipart/#example_NewReader

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to