-
Improvement
-
Resolution: Obsolete
-
Major
-
None
-
5.0
-
None
-
None
There is code in multiple places for these activities. Some of the code should be consolidated into a utility class. Please analyze and discuss with architects.
Definitely unify:
DefaultImageProvider.resolveFileTypeFromMimeType()
FileItemWrapper.resolveFileTypeFromMimeType()
And:
DefaultImageProvider.isImage()
FileItemWrapper.isImage()
Also Consider:
FileItemWrapper.ResolveMediaTypeFromMimeType()
The difference is that FileType includes all of the files that we have icons for. Do we want to do this? Should it be a different name? IconfileType?
This is also handled in DAM with Voters and configuration. Would it make sense to move this functionality out of dam? so that it could be used for files in general? Maybe this implementation can replace the above functions.
DamModule.getMediaTypeForMimeType()
This is very much related to: http://jira.magnolia-cms.com/browse/MGNLUI-213
- relates to
-
MGNLUI-213 ImageProvider should handle documents based on mimetypes, based on configuration
- Closed