Close Menu
MyKnowTech
    MyKnowTech
    • Technical Blogs
    • Career
    • Partner Spotlight
    • Videos
    • Pega News
    • Services
    LinkedIn YouTube Facebook
    MyKnowTech
    Videos

    How to Store Case Attachments in External File Storage in Pega

    Editorial TeamBy Editorial TeamMay 25, 2026Updated:May 26, 2026No Comments3 Mins Read
    Share LinkedIn Telegram Email WhatsApp Copy Link

    If your Pega application allows users to upload documents throughout the case lifecycle, those attachments are by default stored as binary stream data in the Pega database. Over time, especially with large files, this grows into a significant storage problem.

    Storing attachments in an external file storage – Azure Blob, Amazon S3, or a local file system – reduces database size, lowers storage costs and puts files where files belong.

    What You Need to Know Before You Start

    A few important limitations to understand before making this change.

    Only file-type attachments can be stored or migrated to file storage. Link attachments and URL attachments are not eligible.

    Once you configure your application to use file storage, do not revert back to database storage. If you do, you will end up with attachments split across two locations – some in the database, some in file storage. This creates a maintenance nightmare. Make the decision deliberately.

    You also lose the ability to attach the same file multiple times to the same case. Across different cases it is fine, but within a single case it is not supported with file storage.

    Configuration – Two Steps

    There are two things to do. First, configure the application to store all new attachments in file storage going forward. Second, migrate existing attachments from the database.

    You can do these in either order. If you have a small number of existing attachments, migrate them first. If the volume is large and new attachments are still coming in, configure file storage first so new uploads go to the right place immediately, then run the migration in the background.

    Step 1 – Configure File Storage for New Attachments

    Open your application rule and go to the Integration section.

    Under Content Management – Content Storage, the default is Pega database. Change this to your repository instance – the one pointing to your Azure container, S3 bucket or file system path.

    Set the target folder if needed, then save. From this point forward, all new file attachments will be written to the external file storage. The work attach instance still gets created in the database as a linking reference, but the file content itself goes to the repository.

    Step 2 – Migrate Existing Attachments

    Go to System – Release – Upgrade – Attachment Migration.

    To get an accurate count of attachments eligible for migration, you need to specify the correct document class. Pega uses the case class defined in your application instance to determine which attachments to count. Once specified correctly, you will see the number of database-stored attachments ready to migrate.

    Click Start Migration. Pega uses a queue processor – pzAttachmentMigrationProcessor – to handle the migration in the background. Make sure this queue processor is up and running before you start. Once complete, verify in your file storage repository that the migrated files appear. Check the original work attach instance and confirm the stream content has been removed from the database.

    Pega Cloud vs On-Premise

    With Pega Cloud, a default file storage is often provisioned as part of your contract. For client-managed or on-premise deployments, you choose your own file storage and configure the repository instance accordingly.

    Watch the Full Walkthrough

    In the video below I walk through the full setup – configuring a repository for attachments, updating the application content storage setting, attaching a new file and verifying it lands in file storage, then migrating an existing database attachment using the migration tool.

    Attachment migration is one of those housekeeping tasks that pays dividends over time. The smaller your database, the easier everything else becomes.

    Advanced
    Editorial Team

    An insightful team dedicated to empowering the Pega ecosystem with in-depth knowledge, guided by Premkumar Ganesan's vision.

    Related Posts

    Videos

    Application URL Alias in Pega

    May 25, 2026
    Videos

    Understanding Components in Pega

    May 25, 2026
    Videos

    Understanding CORS Policy in Pega

    May 25, 2026
    Videos

    Content Security Policy in Pega

    May 25, 2026
    Videos

    Five Best Practices for Creating Connectors in Pega

    May 25, 2026
    Videos

    How to Plan a Pega Upgrade – A Practical Guide

    May 25, 2026
    Videos

    How to Analyse a Heap Dump in Pega

    May 25, 2026
    Videos

    Data Encryption in Pega Using HashiCorp Vault

    May 25, 2026
    Videos

    Understanding Stack Memory in Pega

    May 25, 2026
    Videos

    Packaging Your Pega Application for the First Time

    May 25, 2026
    Search through the blog
    Tags
    activity Advanced authentication background-processing Beginner case-management Constellation data-model declarative-processing email-processing file-processing Integration pega-core-concepts pega-integration process reporting security system-administration user-interface validation
    Pega Courses

    Pega courses can be accessed at https://myknowacademy.com

    About

    MyKnowTech is a boutique Pega enablement and consulting firm – helping organizations build internal Pega capability through structured training programs, Centre of Excellence setup and hands-on architecture guidance.

    Company
    • About
    • Leadership
    • Career
    • Contact
    Resources
    • Technical Blogs
    • Career
    • Partner Spotlight
    • Videos
    • Pega News
    • Services

    ©  MyKnowTech B.V. All Rights Reserved.

    • Sitemap
    • Terms & Conditions
    • Privacy Policy