Skip to content

5.2.0

Latest

Choose a tag to compare

@SoftCreatR SoftCreatR released this 24 Sep 23:41

This release expands file detection and improves MIME name handling for applications that also use PHP’s fileinfo.

Added

  • Detect APNG, Sony ARW, Adobe DNG, Nikon NEF, ISO 9660 images, Apple Pages/Numbers/Keynote, WMA, KML, and GPX.
  • Add getPreferredMimeType() and conservative MIME alias comparison through MimeTypeAliases.
  • Fill gaps in the MIME catalogue so detected types can also be looked up by extension.

Changed

  • APNG and supported camera RAW files now return their specific types instead of PNG or TIFF.
  • WMA returns audio/x-ms-wma. Unidentified ASF returns video/x-ms-asf.
  • Unidentified OLE compound files return application/x-cfb instead of being assumed to be MSI installers.
  • File hashes are calculated when requested. getFileHash() can now throw if the file has become unreadable.

Upgrade notes

Review MIME and extension allowlists before upgrading, especially rules for animated images, camera RAW files, and MSI uploads. The preferred MIME helper is opt-in; it does not change getMimeType() results or guarantee an IANA-registered name for
every format.

Full Changelog: 5.1.1...5.2.0