-
Notifications
You must be signed in to change notification settings - Fork 266
Open
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap
Description
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
qhenkart
Metadata
Metadata
Assignees
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap