[PEGA 7.1.6] Check File Signature (MIME Type) to Determine File Type Before Upload
Is there an OOTB Activity or function that can validate the file signature (MIME Type) to determine that only valid files (not EXE, etc.) are being uploaded using the OOTB Attach Control? Or must this be done with custom code? If custom, can you lend any insight as to what that custom code would look like? We are already checking file extension, but in some cases that is not enough.
Overriding the CallVirusCheck is an option, but how can refer to the mimetype of the attachment? There is a property pyAttachMimeType but when i look in the clipboard after attaching a file, i can't find it...
I can tell you a crude way of doing this. Write an Obj-Validate and check what comes after last the '.'. If it's not pdf then fire validation message. You have to use this validate rule in pyAttachContent flow action.