Save selected filename in ‘Input Filename’-widget

Save selected filename in ‘Input Filename’-widget

I've a screen with:
- a description that must be unique
- an ‘Input Filename’-widget to select a file

The user enters a description and selects a file through the ‘Input Filename’-widget .
During the Save action a check is done if the description is unique. If not a message is given and Save is cancelled.
The screen is shown again but the problem is that the filename selected through the ‘Input Filename’-widget is made empty.

Is there a way that the selected filename is still shown in the ‘Input Filename’-widget?

Hello Gerard,

Which link method do you use for button/link attached with the select filename widget?

For the select filename this must be submit else the select filename is indeed empty.

Kind regards,
Hi Gerard,

For security reasons, the HTML control used for file upload cannot provide the (local) full path of the uploaded file to the server. What this means is that you will never be able to save a full path and restore it to the widget later if you decide to allow the user to "continue" an upload procedure. This is a HTML, not an Agile Platform, limitation.

What you could do is pre-send the typed in description via ajax to the server and check if it's unique prior to the full submit (that will also send the file). If the description is not unique you could display a validation error and - optionally - even grey out the Submit button until the user changes the description. That way, since you're not really ever leaving the page, the state for the file upload will not never be lost.

I added a small, not really tested, sample here that makes sure the description doesn't contain any "*" chars before allowing a submit.

Hope this helps,