Unable to send attachment with Connect-REST
How to send an attachment with a Connect-REST call?
Steps to Reproduce
A defect or configuration issue in the operating environment
When building the outbound message content for a REST, SOAP, SAP, dotNet, or HTTP connector, the Pega Platform looks for a top-level clipboard page named pyRequestAttachmentPage of type Data-ServiceMessage. If it finds the page in the clipboard, it adds attachments to the outgoing message for every string value found in the pyAttachValues Value List property on the page. Each string is assumed to be a Base64-encoded representation of a binary data value. This clipboard page, pyRequestAttachmentPage, must be created and populated prior to invoking the connector.
Perform the following local-change:
Create and populate the top-level clipboard page named pyRequestAttachmentPage of type Data-ServiceMessage before invoking the REST connector.
Refer to the following screenshots in which pyRequestAttachmentPage is created and populated with file-related properties from rfbPage of type Rule-File-Binary just before invoking the the REST connector in Step 4 of the method called by the activity. (rfbPage gets its contents by the method Obj-Open of the binary file, which is uploaded to the Pega server.)
See this Product Support Community discussion, https://pdn.pega.com/community/pega-product-support/question/sending-attachments-soap-service.
Published August 15, 2017 - Updated October 8, 2020