https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42080
--- Comment #8 from Eric Phetteplace <[email protected]> --- This looks great. I agree it's better to infer type from the actual file data, I was just starting with the simplest change. I like the select set of previewed types and I think it'll cover our staff's use cases. SVG invoices are rare, after all :) A few notes: Requires adding File::LibMagic to dependencies and libmagic on the host OS. The library doesn't appear to be in Koha's current cpanfile. The whole file contents are fed to $magic which could be slow for large files, but then again those were already going to be even more slow to send over HTTP. File::LibMagic lets you initialize it with `max_bytes` param which might be useful if performance becomes an issue. Most files can be identified from very few bytes (e.g. PDF only takes 5). -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
