[Question] Loading images from gateway's file system

ignition80
#1

We currently have a View in Ignition 8.0.1 that needs to retrieve an image or SVG from the gateway’s local file system, I.E. “C:/Files/”

We have a database that holds the path to the images, but not the images or SVGs themselves. How can we load these files into Ignition? We’d prefer not to use the Image Management tool, as users will be editing and uploading files to this directory through an external program.

Thanks,
Richard A

0 Likes

#2

I was having a similar issue and was wondering if someone had an answer as well.

0 Likes

#3

I had a conversation with development just to make sure I was on the same page as them and here are your options:

  1. Move any content you want to share publicly into a directory structure within Inductive Automation\Ignition\webserver\webapps\main\.
  2. Use the Web Dev module to mount your own folders of content

I’ll cover the first option because I’m more familiar with that route.

Assuming your images/svgs are in a folder structure starting with “Files” and there is an image named my_image.jpeg in the “Files” directory (such that C:\Files\my_image.jpeg is a real file):

  1. Move the Files directory to C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main so that you have C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main\Files\my_image.jpeg.
  2. Place an Image Component in a View.
  3. Set Image.props.source to “http://<gateway_ip>:<gateway_port>/Files/my_image.jpeg”.
  4. Done.

The short story of why we don’t allow for you to just point at C:\Files\my_image/jpeg is Security. suppose you had C:\Personal_files\2018_tax_return.pdf on the file system… Well, if we allowed for just pointing components at any old directory, then nothing would be safe.

0 Likes

[feature-12986]Unacknowledged Alarm Sound
#4

Thank you! I had to change one of the network settings in the gateway, but the files are accessible and can be viewed by the client.

0 Likes

#5

Not sure if this relates exactly, but how would I take a .jpeg file from a local directory and move it to a server directory?

0 Likes

#6

using post in webdev

0 Likes