Changes between Initial Version and Version 1 of Ticket #39550, comment 52
- Timestamp:
- 01/15/2017 11:32:22 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #39550, comment 52
initial v1 5 5 Maybe something like this should be integrated to provide more robust file type validation handling? I don't think the behaviors in the main WordPress MIME/type functions should change (at least not without a flag or filter to preserve backward compatibility), but the validation performed in `wp_check_filetype_and_ext()` could be improved to better work with the range of content users might upload. 6 6 7 The \blobmimes\file()helper provides "magic" `finfo` analysis and suggested alternative file names when there is a mismatch. Seems like non-image files should be renamed as well to give their "true" type a chance to pass the `upload_mimes` test.7 The `\blobmimes\file()` helper provides "magic" `finfo` analysis and suggested alternative file names when there is a mismatch. Seems like non-image files should be renamed as well to give their "true" type a chance to pass the `upload_mimes` test. 8 8 9 9 Example file info: https://github.com/Blobfolio/blob-mimes/blob/master/docs/FILE.md#example 10 10 Example MIME types by extension: https://github.com/Blobfolio/blob-mimes/blob/master/docs/EXTENSION.md#example 11 11 12 The \blobmimes\extension()->has_mime()method also provides soft matching of "x-" type variants, which should help catch some additional outliers.12 The `\blobmimes\extension()->has_mime()` method also provides soft matching of "x-" type variants, which should help catch some additional outliers. 13 13 14 14 Any thoughts or suggestions welcome!