Set the mime type by the file name extension.