create attachments api (bug 958382)