Is there a way where we can send the binary content of a file in the Connect-REST Request as binary format or any other format instead of converting to string using base64encode as base64 encoding bloats the request payload size by 33% , which requires more time to process.
We too have similar requirement to send the file content in binary format. We are currently in 7.2 version and sending the file attachments content to sharepoint using Connect-REST with JSON payload after converting the file content to string using base64.
As it's taking time to process and send the file content in string, we are looking for other approaches to improve the performance.
Since we are on 7.2, and I don't see any roadmap to move 7.3 in near future, can we request any hotfix/enhancement to have the above said way of mapping a Clipboard Textproperty to Java Object Property, which at runtime, transmits the data in bytes rather than doing base64 encoding.
You can create a ticket with Global Customer Support if you would like them to help you explore your options, given your limitation.
To be clear, the solution I mentioned is not for "attachments." The multipart message with file attachments is still currently only possible using the base64-encoded behavior.
The new "Map as" option is for the entire payload so, for instance, if you had a service to which you wanted to upload an Excel file by itself (not wrapped within a multipart message!), you could do that without any conversion to a String.
"The multipart message with file attachments is still currently only possible using the base64-encoded behavior". - is this statement hold good for any integration protocol like SOAP or HTTP? or is it applicable only to REST ?
The reason for asking the above question is, we are exploring the option of using Connect HTTP to send the document content in binary form to sharepoint which is capable of mutlipart/form-data. In Connect-HTTP if we send the attachment, will the attachment content be internally converted into string using base64 or will be transmitted as it is i.e in binary form?
Yes, out of the box, the only support for multipart requests in Connectors (SOAP, REST, HTTP) is to use the "pyRequestAttachmentPage" approach, which requires base64-encoding the binary payloads.
If you are using a version of Pega that has Connect-REST in it, I highly suggest using that over Connect HTTP, for best results.
Theoretically, it should be possible to use the "Map as binary" option (if available) and stream your own bytes of a multipart/form-data payload that you construct within a Java context, if you set the request headers to match. I have never tried that.