Aren't you reading the request body, like using io.ReadAll(r.Body), before calling ParseMultipartForm? If the body is read, even partially, beforehand, the multipart parser will encounter an EOF error, resulting in the message: Error parsing multipart form: multipart: NextPart: EOF.