Review 10.4 Merged

65554[TASK] Improve and fix ThumbnailController

Helmut Hummel CR +2 V +2 Easy +29 −21 updated 09/12/20, 12:37

Commit message

The ThumbnailController outputs raw data of image files
as a response to a file process request.
This is a massive and unnecessary performance hit, when using
a remote storage, as the files need to get downloaded from
the remote to be then delivered by TYPO3.

This is now changed to simply redirect to the file URL.

Also the mime-type check for images is replaced with
an isImage() call to the processed file, in order
to also properly deliver thumbnails of PDF files.

Also clarify in code, that ProcessedFile::CONTEXT_IMAGEPREVIEW
isn't capable of handling any other processing instruction
than "width" and "height".

Also fix delivering an icon as thumbnail,
when the processed file isn't an image.

Last but not least, fix the 404 response by using
a HtmlResponse instead of a plain Response object,
because the plain Response object needs a resource
and cannot deal with plain strings.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 6