-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix thumbnail generation for mis-detected file types
* Generate thumbnail despite wrong detected filetype When a file has the wrong extension, fall back to other types available until one works. For unsupported files, get the mime type to determine if we truly cannot support thumbnail generation. Cache the type detected for further requests with different sizes. * Test whether server has Fileinfo extension active Only check mime types with fileinfo extension if it is active. If not, avoid brute forcing type detection by rolling over the various thumbnail generation methods and simply return no thumbnail. * Keep capture file in memory instead of writing to disk Keep the capture data in the Image class if the capture data is valid, otherwise destroy the Image object. Image doesn't read files from disk directly anymore.
- Loading branch information
Showing
6 changed files
with
335 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.