handle the custom mime type at the right place