This repository has been archived on 2026-07-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
espocrm-base/application
SuchAFuriousDeath 49f48340ac Fix attachment MIME type detection for non-image file types (#3604)
The mail parser's MIME type fallback map only contained image types (jpg,
jpeg, png, gif, webp), causing attachments sent as application/octet-stream
(common with Lotus Notes and other legacy clients) to be stored with a NULL
type. This made PDFs and documents download instead of opening inline.

Extended $extMimeTypeMap with common document, archive and media types.

Also fixed getAttachmentFilenameExtension() which used explode('.')[1] to
get the extension — this returns the part after the *first* dot rather than
the last, breaking for filenames like "report.2024.pdf". Replaced with
pathinfo() which correctly extracts the final extension.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 12:56:44 +02:00
..