Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Uploaded file name does not display in the UI

SA-74898

Summary



After selecting and uploading a file, the file name does not persist on the UI and displays No File Chosen instead.


Error Messages



Not Applicable


Steps to Reproduce

  1. Configure a section to add the FilePath control to a property.
  2. Launch the harness to view the section to view the FilePath control.
  3. Choose any file.
  4. Upload the file. The file name is set back to No File Chosen.


Root Cause



An issue in the custom configuration.
 
The FilePath control uses the browser's file HTML element which internally sets the file name to that control. This is performed when any file is selected and the file name cleared after an upload/rerender.

Note: With the FilePath control, the application contains the reference of the filename where it is uploaded and not to display the selected file name.



Resolution



Perform the following local-change to display the file name:
  1. Read the pxRequestor.pyFileUpload property to write a custom control and display the file name from it.

    Note: The pxRequestor.pyFileUpload property still holds the uploaded file name and is set as the value to that file HTML tag.

     
  2. Use the label or any other control to display the uploaded file name which is present in pxRequestor.pyFileUpload property.

Published April 4, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us