[PHRAS-26] Fix mime type detection