Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(file): better uploaded file handling and thumbnail serving
Uploaded files now always have a new name with the client-given extension, even when replacing a previous upload. Thumbnail JPEG files now have the `.jpg` extension and are served with the correct Content-Type. If a plugin happened to have created their own non-JPEG thumbs, they'd now be served with the correct MIME (instead of the original file's MIME type). When an existing file is re-uploaded by a different user, the thumbnails are now created in the correct (owner's) directory. If the file is recognized as an image, but thumbnails can't be created, we no longer allow thumbs from the previous file to be re-used. Fixes #9612 Fixes #9267 Fixes #6677
- Loading branch information
Showing
2 changed files
with
69 additions
and
54 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