Support Article
File is not getting attached in the Data-Portal class
SA-16010
Summary
File is not getting attached in the Data-Portal class with Pega 7.1.6 version.
Error Messages
com.pega.pegarules.pub.PRRuntimeException: Can't continue with file upload. "" is not a file.
Steps to Reproduce
1. Save AttachAFile local action and relevant rules in Data- class.
2. Call AttachAFile local action in Data- class on click of button or /menu action.
3. Pass the WO to which attachment requires to be added.
4. Drag and Drop file. File will be attached.
5. Upload file using "Choose File"(Filepath control) and submit.
Observe that System poses an error "com.pega.pegarules.pub.PRRuntimeException: Can't continue with file upload. "" is not a file."
Attachment stream is not submitted to server from front end.
2. Call AttachAFile local action in Data- class on click of button or /menu action.
3. Pass the WO to which attachment requires to be added.
4. Drag and Drop file. File will be attached.
5. Upload file using "Choose File"(Filepath control) and submit.
Observe that System poses an error "com.pega.pegarules.pub.PRRuntimeException: Can't continue with file upload. "" is not a file."
Attachment stream is not submitted to server from front end.
Root Cause
A defect in Pegasystems’ code or rules: FilePath Control is not having <Form> tag. For file upload to work, the harness or portal should have form tag.
In Perform and other work harnesses form tag is included by default so the file upload is working from Work Object.
Resolution
Perform the following local-change :Include <form> tag in FilePath Control.
Published January 31, 2016 - 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.