We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
when I try to upload a file via a multipart/form-data request I get the error multipart: NextPart: EOF
My code looks like this:
func (c *TypeContext) UserUploadProfilePicture(rw web.ResponseWriter, req *web.Request) { var ( err error file multipart.File handler *multipart.FileHeader ) req.ParseMultipartForm(32 << 20) file, handler, err = req.FormFile("profile_picture") if err != nil { return } defer file.Close() f, err := os.OpenFile("./test/"+handler.Filename, os.O_WRONLY|os.O_CREATE, 0666) if err != nil { return } defer f.Close() io.Copy(f, file) }
The text was updated successfully, but these errors were encountered:
Was this ever resolved? I'm having the same problem.
Sorry, something went wrong.
No branches or pull requests
Hi,
when I try to upload a file via a multipart/form-data request I get the error multipart: NextPart: EOF
My code looks like this:
The text was updated successfully, but these errors were encountered: