Easy way to download logfiles

Hello all,
In our program we log some data in a csv file, now we are looking for an easy way to download them. At the moment we are using WinSCP to do this, but when the system goes to a client we don’t want our client to look into the whole filesystem.
I already tried to do this with node-red but was unable to go to the directory where the files are saved as node-red has no rights to look outside of its own folder. I also looked a bit into using javascript with html5 but found nothing yet quite usable.
I was hoping that someone one the community might already have done this or if someone has a good idea of doing this.

Hello Verab,
if the files only need to be downloaded and security is not an issue.
The easiest solution would be to add the location of the Logfile to the nginx configuration.
at
/opt/plcnext/config/Services/Wcm/nginx/*.location;
with the content:
location /FilesForWeb{`` alias /opt/plcnext/FilesForWeb;`` autoindex on;`` ssi on;`` add_header X-Frame-Options SAMEORIGIN;`` add_header Cache-Control "max-age=0, no-cache, no-store, must-revalidate";``}
Then you can access files via a browser or a simple http get command.
image.png

If the files need to be password protected or write access to the files is neccessary there is a possibility to add a restricted SFTP access for specific directories and users.
kind regards,
Oliver

Hello Oliver,
Thank you for the answer, this is what I was looking for.
I also wanted to be able to download the files when I click on them instead of the browser opening them. So I searched the internet a bit and found a solution to add in the *.location so the files are being downloaded. So if you add the following lines then the files will be downloaded when clicked.

types { application/octet-stream .scv; }
default_type application/octet-stream;