Standard file selector.
that have this behavior applied by default:
<input type=“file” /> - inline single line <widget type=“file”></widget>
These elements placed inside <form enctype=“multipart/form-data”> will cause content of the selected file to be sent to the server.
that this behavior knows about:
filter=“filename-filter” - defines list of file name filters. filename-filter is list of filter groups separated by semicolon ';' where each group contains filter name, ':' and comma separated list of file masks. Sample: <input name="uploadedfile" type="file" filter="HTML files:*.htm,*.html;Text files:*.txt;All files:*.*" novalue="(select file)"/>
novalue=“text” - if file was not selected (the input is empty) then it shows text provided by the novalue attribute. You can style this state by using :empty CSS selector.Together with the standard set of events (mouse, keyboard, focus) behavior: file generates:
type json::value::V_STRING, reports filename selected.
Note that the value is read-only by code. Only user can set the value from UI. That is made intentionally to prevent arbitrary files to be sent from user's computer.