Skip to content

Conversation

@danxuliu
Copy link
Member

The Theming app requires the mime_content_type function, which is part of the fileinfo module, to identify the mime type of the custom images. Currently if mime_content_type is not available the Theming UI does not show any error, but that is fixed in nextcloud/server#33332

Moreover, if the imagick module is installed and it has support for SVG files a rasterized counterpart will be generated for the SVG app icons. In this case mime_content_type is used to identify the mime type of the original icon. If testing this by adding or removing the extension once Nextcloud has been already set up beware of the cached value.

I tried to replace the usages of mime_content_type in the Theming app with the IMimeTypeDetector implementation, which tries in more ways than just mime_content_type. Unfortunately it does not work, as the secure mime type for SVG+XML files is text/plain rather than image/svg+xml, and thus are not properly handled by the Theming app.

The Theming app requires the "mime_content_type" function, which is part
of the "fileinfo" module, to identify the mime type of the custom
images.

Moreover, if the "imagick" module is installed and it has support for
SVG files a rasterized counterpart will be generated for the SVG app
icons. In this case "mime_content_type" is used to identify the mime
type of the original icon.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu
Copy link
Member Author

/backport to stable24

@danxuliu
Copy link
Member Author

/backport to stable23

Copy link
Contributor

@kesselb kesselb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@kesselb kesselb merged commit 426feea into master Jul 25, 2022
@kesselb kesselb deleted the add-hint-about-module-fileinfo-being-required-for-theming branch July 25, 2022 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants