mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-10 11:08:33 +00:00
GODT-2177: Use correct attachment disposition when content ID is set
This commit is contained in:
@ -66,7 +66,7 @@ type Attachment struct {
|
||||
Name string
|
||||
ContentID string
|
||||
MIMEType string
|
||||
Disposition string
|
||||
Disposition proton.Disposition
|
||||
Data []byte
|
||||
}
|
||||
|
||||
@ -528,7 +528,7 @@ func parseAttachment(h message.Header, body []byte) (Attachment, error) {
|
||||
// If not available, try to get it from name param in content type.
|
||||
// Otherwise fallback to attachment.bin.
|
||||
if disp, dispParams, err := h.ContentDisposition(); err == nil {
|
||||
att.Disposition = disp
|
||||
att.Disposition = proton.Disposition(disp)
|
||||
|
||||
if filename, ok := dispParams["filename"]; ok {
|
||||
att.Name = filename
|
||||
|
||||
Reference in New Issue
Block a user