Storing Attachments

We will have on average 5 attachments per case and each attachment to a case would be on average 10 meg in size. Currently we are storing attachments in the Pega database but I'm concerned whether this is a good idea or not. Perhaps we should be using a repository that Pega supports? What is the downside of using database to store the attachments? Gets expensive because the DB will grow large? Performance? What is Pega's recommendation for this?

I see there is an option in application rules to switch to a repository which I am not too familiar with but I assume it means storing attachments on a file server on the cloud since our app is running in the pega cloud. Can we easily switch to use repository and still get to our current attachments that were attached in the database? IS the switch from database to repository transparent? In other words do we have to change our application code besides the application rule(s)? We do have a feature in the application where we perform a word merge and attach cases and display the case via some common built in Pega activities. Should that still work?

***Edited by Moderator Marissa to update platform capability tags****


Keep up to date on this post and subscribe to comments

July 22, 2019 - 3:51pm

Another thing to add is that we don't see much of a need for these attachments to be accessed outside of Pega only within case in Pega would the attachments be needed to be accessed.

July 22, 2019 - 4:10pm

Ah.  I ran a test and switched to repository instead of Database storage and found it is not transparent as my application code needs to change at least when I'm displaying word merge files and in fact it looks like the displaying of these attachments do not open as seamlessly as before when they were stored in the database

August 17, 2019 - 2:39am



Its always better to go for external repository for attachment storage rather than Pega DB. Over the time, when the number of attachments increases your DB size will also increase .



August 17, 2019 - 2:41am

You can also use external repository in order to store bigger file. Pega Cloud offers  Cloud File Storage which is build on S3 and provides long-lived file storage.


August 17, 2019 - 2:42am

The below link might also provide some useful information.


August 17, 2019 - 4:03am


Your application's performance will keeps on degrading with attachment present in pega database.It is always a good idea to store them in external repository like alfresco,amazon s3 etc.You can use connect CMIS rule for that.