Tips & Tricks - Media types and file icons
If special files are saved and provided for download in a portal, a standard icon for unknown file types will be displayed. Files, such as from CAD programs, are not included in the standard lists. This workshop demonstrates how the media types in Intrexx can be extended. The corresponding file icon will then be displayed and the file will be opened in the corresponding application when it is selected in the browser.
To extend the media types in Intrexx, please proceed as follows:
1. Extend mimemap-custom.xml
This file can be found in the portal directory internal/cfg. Custom definitions for media types can be added to this file. The following pattern is used for this:
<entry extension="dateikennung" mimetype="mimetype"/>
An Autocad file, which has the .dwg type, requires the following entry:
<entry extension="dwg" mimetype="application/acad"/>
An interesting source to help define MIME types is available here.
2. Icons for additional file types
The icons, which Intrexx displays in download controls, are stored in the portal directory external/htmlroot/images/assets/filewalker/ext. The following pattern is used to name these:
Therefore, Autocad files would be named as follows:
The files can also have the .png or .jpg format. The assignment table in step 3 needs to be defined accordingly to achieve this. Larger images are more ideal for tablets and smartphones as these need to be pressed with a finger.
Sources for alternative icon files
3. Assign MIME types to the icon files
The file extensions can be assigned to the icon files in the file fileextension.properties in the portal directory internal/cfg. The pattern for this is:
The file format can also be .png or .jpg, if the file in the icon directory has the corresponding format.
4. Restart the portal service
Finally, restart the portal service.