replaceAttachments