Hi All,
We recently upgraded our application from Pega Platform 25.1.3 to 25.1.4 and observed a change in behavior with file attachment validation in Constellation.
In 25.1.3, we implemented a restriction for .exe file uploads by customizing the Call Virus Check activity and adding our own Java code. When an .exe file was uploaded, the attachment was correctly blocked and the custom error message configured in the Java code was displayed to the user.
After upgrading to 25.1.4, the attachment is still being restricted correctly, but instead of showing our custom validation message, the attachment widget displays a generic message:
“Upload failed”
During troubleshooting, we noticed that the actual error seems to be available when inspecting the Form View/network response, but it is not being surfaced to the user through the Constellation attachment widget.
Has anyone observed a similar behavior after upgrading to 25.1.4?
A few questions:
- Was there any change in the attachment component or error-handling mechanism in Constellation between 25.1.3 and 25.1.4?
- Is there a supported way to surface custom virus check validation messages to the user in the attachment widget?
- Are there any known issues, hotfixes, or configuration changes related to attachment upload error messaging in 25.1.4?
Any guidance or experiences would be greatly appreciated.
Thanks!
Sorry you’re having issues, I’d like to see if I can reproduce the scenario to better troubleshoot it.
- For my understanding, could you please confirm that you’re using the
CallVirusCheck activity, and whether you’re on PegaCloud (which version?) or on-prem?
- Would it be possible for you to share the custom java code in a post here? At least seeing the “skeleton” would help me attempt to reproduce the scenario.
Hello @peter_bessman
The overall issue here is not specifically about CallVirusCheck.
Let’s say i want to restrict the file extension .tiff in my application and will try to use the RestrictAttachmentFileTypes DSS to add the “image/tiff” to the value as comma separated text.
Now, when i try to upload a tiff file from Add links in attachment widget on the case, i should see the specific error saying that “The attachment type is not allowed” as configured in the OOTB code below
However, we are getting a generic message like below,
If we check the tracer, then the appropriate specific message is returned by server and also seen in the response in Network tab as well. But the attachment widget is showing a generic message making it difficult to understand what was the actual issue.
However, when we do the same in the case context in a form, its working fine as shown below
Vinod has implemented this extension check specifically in CallVirusCheck activity by not depending on the DSS. But the issue eh is facing is the same.
Hope this helps to understand the issue.
Regards
JC
OK I am going to investigate stay tuned.
I can’t get Pega to show the Error_Attachment_Types_Not_Allowed message in either 25.1.1 or the latest pre-release internal build that I can access. Nor could I find anything in our internal project management systems nor our public documentation about that rule.
- This isn’t conclusive, but it does suggest that your particular Java code could in fact be important. It also suggests (though it doesn’t prove) that Pega’s behavior in this regard has been consistent across versions.
- I was able to confirm that using the
Allowed file extensions parameter for an attachment field resulted in a specific error message, I discuss this below and it is worth considering as an alternate way forward.
- My search suggests (though again, it doesn’t prove) that there aren’t any relevant “issues, hotfixes, or configuration changes related to attachment upload error messaging.” But I conducted my evaluations in non-production environments, and it is possible that these hosting details are significant.
If you can address the two questions I posted previously I can use that information to investigate further — but you may also want to consider if simply using the Allowed file extensions parameter is sufficient for your needs, since that is trivial to setup.
Additional information:
I could not find anything about Error_Attachment_Types_Not_Allowed in our internal project management systems, nor our public documentation.
I had immediate access to a 25.1.1 environment, and verified that application/vnd.microsoft.portable-executable was listed in the RestrictAttachmentFileTypes DSS. This displayed generic error messages when I attempted to upload an .exe whether through the Attachments utility or an attachment field in an assignment step. I tested a .jpg as a control and that worked as expected. I also configured the Allowed file extensions parameter in my case’s attachment field, allowing only .png files — this triggered a descriptive error message when I tried to upload a .jpg. I then ran through the same analysis in a pre-release environment and observed the same behavior. Neither environment displayed the contents of Error_Attachment_Types_Not_Allowed in any of the error messages no matter how triggered.
I did not have immediate access to the specific versions mentioned at the beginning of this thread, which is part of why I wouldn’t call my findings totally conclusive. But while not impossible, I would consider it improbable that the platform would behave in the manner noted apparently exclusively in version 25.1.3.
Below are screenshots of my analysis for clarity.
Screenshots from 25.1.1 environment:*
Screenshots from pre-release environment:
Hello @peter_bessman
Let’s just stick to the uploading of file from Utilities> Attachments widget where you cannot mention any specific types of extensions as filters/validators and hence you have to depend on the DSS RestrictAttachmentFileTypes to avoid unwanted extensions.
In that scenario, i should be seeing a specific message related to the extensions which are not allowed.
From assignment context, i can specifically configure the extensions allowed on the attachment field and hence i need not depend on the DSS. So, there we are fine there.
Hope this narrows down the problem.
Regards
JC
I think I’m following but want to be sure:
Are you still looking to confirm if this is a regression — i.e. that the OOTB utilities attachment widget used to display the Error_Attachment_Types_Not_Allowed message for disallowed uploads in 25.1.3 but no longer in 25.1.4? If so, as per my previous analysis this seems unlikely, and a deeper analysis warrants the details discussed in my first post.
However if the question is: what can be done about this now? Then specifically in the case of the attachments widget in the utility panel I think the answer would be to create a custom component — this example could serve as a starting point. I could also log a feedback item with our product teams if you like, the use case makes sense to me and I think I could advocate for it effectively.
@peter_bessman It’s not a blocker but, the user will not know what was the actual error for failure. May be logging a feedback item would be good step forward.
If possible could you please check this issue as well posted by me Issue with Simple Table in v26.1.1 Community Edition
Much appreciate your time taken on these topics 
Regards
JC
Hi @peter_bessman
Thank you for taking the time to investigate this and for the detailed explanation. I appreciate your efforts in looking into the behavior and sharing the possible approach with a custom component.
Yes, it would be great if you could go ahead and log a feedback item with the product team. The ability to display a clear, user-friendly message when an attachment is rejected would be very useful, especially since users currently receive no indication of why the upload failed.
Thanks again for your help and for offering to advocate for this enhancement.
Kind regards,
Vinod