jshttp/mime-db
The canonical MIME type database from jshttp, published as JSON. It maps file extensions to media types and includes metadata such as compression and charset, powering Node.js HTTP libraries like mime-types and Express.
Content-Type headers, file downloads).mime_content_type() or finfo integration.Accept header parsing for APIs).Adopt if:
spatie/array-to-xml doesn’t cover this).Look elsewhere if:
finfo or mime_type packages).Executives: "This package eliminates manual MIME type management for file handling—saving dev time and reducing errors in uploads/APIs. With 1,800+ standardized types, it’s a drop-in solution for compliance and scalability, costing $0 vs. building/maintaining our own database."
Engineering:
*"Leverage jshttp/mime-db to:
.exe files via mime-db checks).Content-Type headers dynamically).MimeType::get('image/png')).
Tradeoff: No runtime detection (use finfo for that), but perfect for static lookups."*How can I help you explore Laravel packages today?