fixed upload many attachments && normalize rev for documents