New issue
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
mime/multipart: CreateFormFile defaults content-type to application/octet-stream #30218
Comments
You can use |
@ianlancetaylor this is where content-type is set https://github.com/golang/go/blob/master/src/mime/multipart/writer.go#L145 |
That is |
@ianlancetaylor nice catch! updated |
OK. But it's still true that |
/cc @bradfitz just in case you want to weigh in. It sounds like this should be closed, based on the feedback from @ianlancetaylor on this issue. |
Yeah, I agree with Ian. We can't break compatibility and it's already possible to set other content-types with the other methods. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
createFormFile always defaults content type to application/octet-stream which is not always the case.
What did you expect to see?
Should allow you to customize or it should detect the content type
What did you see instead?
Defaults to application/octet-stream
The text was updated successfully, but these errors were encountered: