update attachment.