create attachments api (bug 958382)
Merge pull request #1629 from ngokevin/commattachapi

create attachments api (bug 958382)