Gopi_Penmetsa Member since 2015 4 posts
Posted: 2 years ago
Last activity: 1 year 11 months ago

Rest Response attachment stream for large files of size 500 MB gives java heap space error, can we choose the location to write file instead of stream to a property in response, similar to OOTB CMIS GetContentStream

CMIS request to get the document from the content management system, let us take an example of Alfresco.

If we use OOTB CMIS GetContentStream we get the stream response back to Pega Server from Alfresco server and this is created as a file in Pega Server location.

Example response of OOTB CMIS GetContentStream

pyStream file://default:/CMIS_Documents/
pyLength 422871301
pyMimeType application/octet-stream
However when I use alfresco REST API i.e. getNodeContent
If you paste the above URL to the browser it is downloaded as an attachment.
However, when you create REST Connector in Pega, we get base64 encoded string as response and when we try to get large files of size example 500MB the request fails with java heap errors.
I want to write code such that file is downloaded to a location rather than getting base64 encoded string in response.
I think pega OOTB CMIS connector rule might have written some code to get the stream as download file to a location.
OOTB CMIS getcontentStream is able to download the file of size 500 MB without any issues.
Any ideas to achieve the same for REST Connector.
I know we can set the request header as ContentDisposition: attachment
However, I want to know how we can choose the location.
Pega Platform Low-Code App Development Data Integration
Moderation Team has archived post
Share this page LinkedIn