Question
Barclays
IN
Last activity: 30 Aug 2023 9:34 EDT
Store attachment to Pega database or Repository on conditional basis
I have a requirement that while attaching any file to case, I will be capturing type of file. For certain file type it should be stored in Pega database and for others it should go in one repository. I have selected default Pega database in Application rule so first problem is solved. For second scenario I need to use repository API as well as extract data in stream and use pyStream since file size is going to be huge. Also I am not able to store file in repository as Pega throws error that it fails to create file when I try to use string in pyContents.
I need to stick to keep default storage as Pega database keeping in mind in other scenarios in application. Repository connections are perfect and when I test by setting Repository as default storage, files are getting saved. It is manual API which is getting failed.