Preserve original filename and content type on attachment download

FixEmailService
Shipped
May 9, 2026 at 6:35 PM UTC
Author
Kamo
Commit
c783fde

The **************** endpoints (both the personal and shared-mailbox controllers) were emitting Content-Disposition: attachment with no filename parameter and Content-Type: application/octet-stream, forcing the browser to fall back to the URL's trailing index segment for the saved filename — files saved as "0", "1", etc. with no extension. Look up the matching AttachmentInfo via getMessage() and build a proper ContentDisposition with UTF-8 filename plus the real content type, falling back to the previous behavior when metadata lookup fails.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing