Attachments

Purpose

These commands are used to perform certain actions related to attachments. 

Request URL 

Upload attachment from URL

Used to fetch a file from the given URL and upload it as an attachment to a new email.

clientsdk.dispatch("fetchAnduploadAttachment", { attachApiXhr:{} }).then(function(mailObj){ });

Download attachments

Used to download attachments using the given metadata. If needed, the file can then be sent to a destination using a callback API.  

clientsdk.dispatch("downloadAttachment", { attachInfo:{} callbackApi:{} }).then(function(mailObj){ })

Request Parameters

ParameterDescription
attachApiXhrInvoke URL - {fileName:<name>, url:<api url>, type:<request type>, headers:<headers>, payload:<payload>, servicename:<serviceName>, params:<request params need to be sent>}
attachInfo{groupId: "", entityId: "", entityType: "", attachId: ""} 
callbackApi Invoke URL - {url:<api url>, type:<request type>, headers:<headers>, payload:<payload>, serviceName:<serviceName>, params:<request params need to be sent>, file: {fileName: <name of the file>, fileParamName: <parameter name in which the file should be sent>, attachPayload:<request body need to be sent along with file upload>}