Quite often the reason a custom transform is created is to convert to or from a MIME type (or Media type) that is not known to Alfresco Content Services by default. Another reason is to introduce an application specific MIME type that indicates a specific use of a more general format such as XML or JSON.
From Alfresco Content Services 6.2, it is possible add custom MIME types in a similar way to custom Pipelines and Renditions. The JSON format and properties are as follows:
{
"mediaTypes": [
{
"name": "MPEG4 Audio",
"mediaType": "audio/mp4",
"extensions": [
{"extension": "m4a"}
]
},
{
"name": "Plain Text",
"mediaType": "text/plain",
"text": true,
"extensions": [
{"extension": "txt", "default": true},
{"extension": "sql", "name": "SQL"},
{"extension": "properties", "name": "Java Properties"},
{"extension": "log", "name": "Log File"}
]
}
]
}
- name Display name of the mimetype or file extension. Optional for extensions.
- mediaType used to identify the content.
- text optional value indicating if the mimetype is text based.
- extensions a list of possible extensions.
- extension the file extension.
- default indicates the extension is the default one if there is more than one.