Posted: 4 May 2017 11:04 EDT Last activity: 16 Oct 2018 12:03 EDT
How to decrypt a BLOB File that was encrypted from Pega
I am working on a project where I need to extract the documents (pdf/images/texts) from the work objects and store it in a Directory structure. This will be done in a batch process for bulk data. These documents are present in the database in as encrypted BLOB files. I need to decrypt the BLOB to extract the documents from the database, and save it to a folder in a Directory structure for each case. For example, if there are 5 attachments in a work object all 5 should be stored in a sub folder (under a main parent folder) of that name.
Can anyone please help me in this regard?
Thanks in advance
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
I know there are tools the get individual property values off of objects stored in the blob. I don't know of anything you can do outside the system to do that. From within the platform, you can do an obj-open-by-handle to load the object into memory and then write it to disk. You may need to create a utility that does that in a manner that your other tools can digest.
Further to Mike's answer: there are some notes and code that might useful here on this post : https://pdn.pega.com/node/294836 - it shows you how to access Attachments (NB: only those 'internal to PRPC -not those stored in a External Content Management system) to create a ZIP file.
You could probably modify this code to save the attachment data to a file on disk - rather than creating an in-memory ZIP file.