Hello again
I am still working on the link embedder, but another problem has arisen. Uploading images works using httpPost and system.file.writeFile, and they can be seen in the file directory on the machine running the gateway, but mounting a folder to the same spot does not work.
In WebDev, I have mounted “/var/www/DRI_Portal2/” in a mounting file called “Files”. This should result in http://10.107.0.33:28088/system/webdev/DRI_Portal2/Files/ existing, and files below it being accessible.
This does not work and all requests of files return 404 errors. For example: http://10.107.0.33:28088/system/webdev/DRI_Portal2/Files/DRI_Office_Streetview_01_2021-12-08_030529.jpg
Swapping to https on 28043 does not fix it either. https://10.107.0.33:28043/system/webdev/DRI_Portal2/Files/DRI_Office_Streetview_01_2021-12-08_020615.jpg
I need this functionality for image embedding as images must use internet directories for perspective/html and not local ones
I was able to make this work on a local host gateway on Windows, but not on linux.
Any help is greatly appreciated
My first thought would be permissions; are /var/www/DRI_Portal2/
(and the files within) readable from the perspective of the Ignition gateway?
Unfortunately, there’s not really any logging to turn on, but there’s also not a whole lot to go wrong when serving up mounted folders. The code is literally only doing this check, which is apparently failing since you’re
getting a 404:

I think I found part of the problem. Inside WebDev in the mounted folder sheet, the folder path does not save if it is manually typed in. “Choose…” updates it, but choose only pulls the local directory. Folder path does not save with /var/www/DRI_Portal2/ in it, instead it reverts back to the c:// one I put in before.
Is there a way to fix this? Some easy to edit file or something?
There should be a .json file on disk (e.g. $installDirectory/data/projects/$yourProject/com.inductiveautomation.webdev/$pathToResource/
) that has the folder key. If you’re on 8.1, you’ll have to wait 5 minutes (or restart the gateway) for changes to the resource on disk to be picked up.
Actually, what version are you on? This is supposed to be fixed in 8.1.4; whatever’s in the text field should get saved on resource save.
I am on 8.0.16.
Currently, upgrading to a new version is not possible for a few months at least. Is there a spot I can change to make this work in the meantime?
The file on disk should work on 8.0.16.
Thank you for your help. Editing the config.json worked to change the file path. For archiving sake, and future use, changing the “folder-path” in config.json to the file path works. For linux, it needs to be the / characters without escapes. For windows, it needs \ with escapes (\\)