This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,779 Users
  • 2,269,776 Discussions
  • 7,916,827 Comments

Discussions

Apex File Load Component - Retain File Name

Manikandan M
Manikandan M Member Posts: 53
edited Apr 16, 2020 2:34AM in APEX Discussions

Hi All, I am currently using Apex 19.2. In my application, I am using the file browser option to upload a file. After selecting the file, first I will validate the file and show if it is successful or not. This one was a precheck of uploading. Once the validation process gets to complete the file name not retain in the file loader component. So I have to reselect the file again to upload that. is there any option or workaround available to retain the file name once after the process or page submit, so my user can select the file one time to validate and uploading it? Please share your thoughts on this. Thanks In Advance...

Tagged:
4222119

Answers

  • fac586
    fac586 Senior Technical Architect EdinburghMember Posts: 21,579 Red Diamond
    edited Apr 16, 2020 2:34AM
    Manikandan M wrote:I am currently using Apex 19.2. In my application, I am using the file browser option to upload a file. After selecting the file, first I will validate the file and show if it is successful or not. This one was a precheck of uploading. Once the validation process gets to complete the file name not retain in the file loader component. So I have to reselect the file again to upload that. is there any option or workaround available to retain the file name once after the process or page submit, so my user can select the file one time to validate and uploading it? Please share your thoughts on this.

    No, this is not possible for security reasons. Per the HTML specification, APEX will not render a value in a file browse item on page show. This protects the user from nefarious persons specifying or changing the file item value in order to capture a file the user does not intend to submit (e.g. /etc/passwd).

    The user must always explicitly identify the file that is to be uploaded.

    My thoughts are that this is another case where you are trying to implement functionality in a non-standard way. If you need to perform complex validation or pre-processing on a file, organise the process into a  multi-stage wizard where you can walk the user through multiple validation and processing steps.

    4222119