Issue Summary
When receiving an attachment via Inbound Parse and using the helper, the content type of all attachments are text/plain. I have tested this with .zip and .jpg files.
I would expect these to be application/zip (or at least application/octet-stream) and image/jpg
Steps to Reproduce
- Send email to your inbound address
- Use the below code to spit out the content types of attachments.
Code Snippet
func HandleInbound(w http.ResponseWriter, r *http.Request) {
parsed := inbound.Parse(r)
for name, contents := range parsed.Attachments {
contentType := http.DetectContentType(contents)
fmt.Printf("%v has content type %v", name, contentType)
}
}
Exception/Log
test.jpg has content type text/plain; charset=utf-8
test.zip has content type text/plain; charset=utf-8
Technical details:
- sendgrid-go version: v3.6.4
- go version: 1.15.1
Issue Summary
When receiving an attachment via Inbound Parse and using the helper, the content type of all attachments are text/plain. I have tested this with .zip and .jpg files.
I would expect these to be application/zip (or at least application/octet-stream) and image/jpg
Steps to Reproduce
Code Snippet
Exception/Log
Technical details: