Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Storing case attachments using external storage

Updated on November 28, 2022

Upload large files without causing out-of-memory errors by configuring your application to store case and Pulse attachments outside the Pega Platform database.

For example, you can configure an external storage for attachments for insurance agents to ensure that the system always have enough memory even with heavy upload of files that support insurance claims.
Before you begin:

Important: Ensure that you review the restrictions for adding a repository for case attachments in Limitations for attachments in a file storage repository. If you fail to observe restrictions as you implement a repository, you can experience system failures.
The default storage for on-premises deployments is the Pega database. As a best practice, use repositories for case attachments. Repositories are the only supported content storage type that supports streaming and that has no risk of running out of memory.

Your environment type determines the repositories that you can configure for your external content for case or Pulse attachments:

  • In Pega Cloud environments, you can use pegacloudfilestorage and the /attachments subfolder as the repository for case attachments, or you can configure another type of repository.

    Before integrating the repository in your application, you can change the repository that you use for case attachments to another external repository type after you create the repository.

    For more information, see Creating a repository.

  • In on-premises and client-managed cloud systems, you specify an external repository for case attachments after you create the repository.

    For more information, see Creating a repository.

Important: Do not use the internal Pega Platform database as a repository.

For more information about different types of content storage types that you can use, see Integrating with file and content management systems and File and content storage.

Note: To access the contents of a repository that stores attachments, you can use the D_pxGetFile API.

For more information, see Repository APIs and Using repository APIs in your application.

  1. In the header of Dev Studio, click the name of the application, and then click Definition.
  2. On the Application form, click the Integration tab.
  3. In the Content storage section, configure at least one external storage system:
    ChoicesActions
    CMIS systems
    1. Select the Store in CMIS system checkbox.
    2. In the Connector name field, select a connector.
    A web service provider
    1. Select the Store in web storage provider checkbox.
    2. In the Provider list, select an installed web storage provider for which you have an account and a content location.
    3. In the Authentication profile box, enter or select an authentication profile of the OAuth 2.0 type.
      Note: Use the same authentication profile to store content in and source from the web storage provider.
    4. Click Browse, and then select the target folder for your attachments.
    5. Click Select.
    6. Optional: To display a prompt to users before they delete an attachment, click the Prompt users for confirmation before deleting content from storage location checkbox.
    A repository
    1. Select the Store in repository checkbox.
    2. In the Repository list, select a repository for which you have an account and a content location.
      Note: Pega Cloud clients: To use Pega Cloud File storage, select the pegacloudfilestorage repository.
    3. Click Browse, and then select the folder for your attachments.
      Note: Pega Cloud clients: To use Pega Cloud File storage, select the /attachments sub-folder.
    4. Click Select.
    5. Optional: To display a prompt to users before they delete an attachment, click the Prompt users for confirmation before deleting content from repository checkbox.
    For example:
    Application configured to enable the storing of content for attachments in a repository
    An Application form that shows the configuration of a repository as the storage option for attachments.
  4. Click Save.
Result: Pega Platform adds new attachments that you create in a case or Pulse conversation to the location that you choose.

Limitations for attachments in a file storage repository

When you configure your application to store case or Pulse attachments in a repository, consider the limitations to ensure that your attachments are stored and retrieved correctly.

Ensure that you review the following limitations for adding a repository for case attachments:
  • Repositories support only file attachments. All other types of attachments reside in a database.
  • You cannot change the content storage type from repository to a different type.
  • After you switch from database storage to repository storage, you cannot switch back to database storage without losing access to the attachments in the repository.
  • You cannot modify the configuration of a repository after the repository is in use.
  • Application attachments that you provide on the application form reside in a database.
  • Multiple applications in the same application rule stack must have the same repository configuration, or users cannot access the file attachments.
  • Because the application Pulse gadget cannot prompt for authentication details, Pulse attachments that you provide on the Application Overview landing page reside in the repository only when your session is already authenticated or when the repository supports non-interactive authentication. If both of these conditions are false, an error occurs and the operation fails.
  • The following features are not supported for custom repositories during DevOps:
    • Import and export
    • File listener
  • For large images and PDF attachments, poster creation is skipped, and then Pega Platform creates a placeholder thumbnail.
  • When using database storage, you can attach multiple files that have the same name to the same case. For external storage, you cannot attach multiple files that have the same name to the same case because storage providers treat the file name plus the path as a key. Attempting to attach multiple files that have the same name to a case causes an error. You can, however, attach files that have the same name to different cases.

    For more information, see Creating a repository and File and content storage.

    Note: When you configure your application to store case attachments in a repository, Pega Platform appends the case ID to the attachment name. For example, an attachment called loanapplication.pdf becomes loanapplication_CASE-1234.pdf.
  • The unsupported characters that might not work in attachment names are {""", "?", "*", "<", ">", "|", ":"} .

Migrating case attachments to a repository

Reduce the size of your Pega Platform database and improve performance by migrating the case attachments for your application from a Pega Platform database storage to a repository.

Note: When you migrate your applications from on-premises to Pega Cloud deployments, move your attachments from a Pega database to a repository.
Before you begin: Ensure that the http://doc-build02.rpega.com/techdoc/content/writing-guidelines/reference-common-dita-elements-ref.html?hl=apiname ">pzAttachmentMigrationProcessor queue processor is running. For more information, see Changing a queue processor rule state.

Note: Note that pzAttachmentMigrationProcessor is configured to run for a maximum of 100,000 attachments. For migrating a larger number of attachments, create a custom Queue Processor that suits your needs. For more information see: Creating a queue processor rule.
  1. In the header of Dev Studio, click ConfigureSystemReleaseUpgradeAttachment Migration.
  2. In the Repository field, select the repository to which you want to migrate case attachments.
  3. Click Browse, navigate to the folder on your repository that you want to use for case attachments, and then click Select.
  4. Click Start Migration.
  5. Click Refresh to update the display.
Result: After the migration finishes, the results include the number of migrated files. For the files that were not migrated, the system work object ID and a description of the error, which you can use for troubleshooting.
What to do next: Ensure that the repository to which the files were migrated is the same repository where you store new attachments. For more information, see Sourcing attachments from external storage.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us