Web based file upload

Hi, I need to download and upload custom configuration files to the PLCnext to be used by my C++ pcwlx library. This would enable our end user to backup/restore its system configuration. Using a HMI support file, I was able to quickly implement the download part using HTML5. But the upload part is more trickier as it requires some work on the web server side and I am not a web specialist. I found that the nginx configuration file is located under /etc/nginx/nginx.conf. Is it possible to just add to it a configuration section that would enable a basic file upload mechanism? I learn that a “nginx-upload-module” exist. If it is the best solution, can you provide me with instructions to cross compile and install it on the PLCnext? https://github.com/fdintino/nginx-upload-module Any better idea ? Thanks a lot Frédéric PLCnext Enginner 2019.3

Hi Frédéric, That is an interesting question. I guess that the web server already has file upload capability, because we use it in the Web Based Management pages to (for example) load firmware update files. I will try to confirm this and see if a similar mechanism can be used to upload your own files. - Martin.

Hi Frédéric, The upload of the firmware file on the Web Based Management page is handled by the javascript in this file: /var/www/plcnext/wbm/FirmwareUpdate.js I think the key part of this is the AJAX request in the sendDataToControl function. Perhaps this will help with your own file upload function? Martin.