If you're doing this anyways, why not set the mimeType of object.content while you're at it?