add attachment api for designdoc