please add assert to check `mime_type`