add mimetype, adjust add_document to match