Web Dev Mounted Folder UNC path not working as Perspective Video Player source

I’m trying to build out a view where a user can upload files, see them in a table, click on them in a table and get a preview of the media they uploaded (image, video, etc). As the title says, I’m trying to set the source of the Perspective Video Player component to a video located on a server that isn’t the Ignition Gateway.

Here is what I did: I logged into the Ignition gateway, opened the Designer on the gateway, and created a new Mounted Folder inside the WebDev module. I clicked Browse, browsed to a folder that is mapped (from another server), accepted the default name, and clicked OK. This resulted in a path like Y:/TestFolder. I went back to my local dev machine, opened the same project and copied the Mounted Path in the newly created Mounted Folder; something like /system/webdev/<project_name>/<webdev_resource_name>.

I thought I was good to go from this point. I put in /system/webdev/<project_name>/<webdev_resource_name>/sample.mp4 into the Video Player source and saved, but when I went to view it in the session, I got a “Error loading media: File not valid” error message and a GET ... 404 (Not Found) message in the browser console.

I thought it might’ve been folder or file permissions, but I ruled that out of the equation at this point.

I was able to get a Video Player to play files that were hosted on the Ignition gateway server through WebDev, but I don’t want to store image/video media on the Gateway, for obvious reasons.

What am I doing wrong?

Does the gateway have access to this mounted path/drive? https://docs.inductiveautomation.com/display/DOC80/Mapping+a+Network+Drive

Depends on what you mean by have access… I can see test text files in the directory where the media will be stored (using system.file.fileExists() or system.file.readFileAsBytes(); I’m not certain if the path for those functions is relative to a client or to the gateway server). I can’t, however, see the test text files in the media directory by using the http address (what the browser console logs; something like http://serverip:port/system/webdev/project/resource/testing.txt). If I create a new Mounted Resource and mount it to a drive local to the gateway server, I can access resources in the browser by just putting in the aforementioned url into the browser (even videos).

I didn’t add anything into the conf file, nor did I restart the gateway service. I don’t remember doing so in the past, but I’ll speak to our other engineers and confirm that.

I spoke with some of my colleagues and they said that they did map drives by modifying the config file. I will do that now and report back if I still have issues after.


1 Like