Set mime before setting content