Upload file
Posted: Sun Apr 23, 2023 9:48 am
Hi!
There is a modem settings page so that you can save or restore its configuration.
I managed to save the settings, but when uploading the configuration file to the modem, there was a problem.
Here is the code of the input field where the configuration file is selected:
when you click on this input field, a file selection dialog box opens.
Using JS I'm trying to call this window:
but nothing happens, I assume it's because of security rules (yltype="file")
Maybe there is an option that disables security and you can open a file selection window?
There is a modem settings page so that you can save or restore its configuration.
I managed to save the settings, but when uploading the configuration file to the modem, there was a problem.
Here is the code of the input field where the configuration file is selected:
Code: Select all
<input id="importCfgConfig" type="text" yltype="file" class="upload_file_input" readonly="readonly" filedesp="{'filename':'localcfgfile', 'maxlength':'5MB', 'action':'localcfg', 'filetype':'localcfg'}" value="" onclick="YLFile.SelectFile('importCfgConfig')" dvalue="">
Using JS I'm trying to call this window:
Code: Select all
Chromium1.ExecuteJavaScript('document.getElementById("importCfgConfig").click()','', 0);
Maybe there is an option that disables security and you can open a file selection window?