Enh: define allowed mime types as an object instead of an array.