Question

Sample Code for CallVirusCheck

Hi,
My requirement is to limit malicious extension files from being uploaded to the case and also deleting them from ServiceExport if they are found malicious. I have found posts saying CallVirusCheck can be useful in this regard. Can somebody help me with the steps to achieve this and also an example or sample code to understand how to implement this?

Comments

Keep up to date on this post and subscribe to comments

November 8, 2019 - 5:01am

Hello, 

You have a bit more details on the help file: To test arriving email attachments for software viruses, override the extension point activity Data-WorkAttach-File.CallVirusCheck with an activity that calls your third-party virus software. Your activity can call a Java class or (in a Microsoft Windows server) a Dynamic Linked Library routine.

https://community.pega.com/sites/default/files/help_v83/procomhelpmain.htm#/express/rule-/rule-service-/rule-service-email/related.htm

 

 

Pega
November 13, 2019 - 12:24am

Hello, 

To limit the upload of some particular extension file we can use two approaches,

1.) Update the attached code in pyUploadFile activity. The below code will check the extension of the file and delete the file accordling.

2.)You can add the attached code in CallVirusCheck activity also. This activity is also being called from pyUploadFile. 

Kindly let us know if this resolves the issue.