Support Article
Upload Attachment not working after upgrade to Pega 7
SA-23777
Summary
Upload FIle Attachment is not working. After browsing for a file attachment, attaching it to the work object, and then trying to save the work object, users see a PRRuntimeException.
Error Messages
com.pega.pegarules.pub.PRRuntimeException: Can't continue with file upload. "" is not a file.
Steps to Reproduce
- Upload a file attachment to a work object.
- Try to save the work object.
See the error message.
Root Cause
An issue in the custom application code or rules
The Visible When Rule is configured on a section and it is configured to execute on the server side.
This causes the selected file data to be submitted as soon as the section loads. The issue is resolved after selecting the Run on Client side option for the Visible When condition configured to display section, where the Filepath Control is placed.
Resolution
Here is the explanation for the reported behavior:
The application developer specified the file location from the client machine in the same section after the file upload. The developer used the hiddenFilePath parameter value to achieve this.
This approach worked successfully for PRPC 6.x, but it does not work for Pega 7.x.
In Pega 7.x, the hiddenFilePath parameter value is not exposed because it is internal to the control and cannot be exposed externally.
To get more information about this solution, visit the Product Support Community.
Published July 7, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.