I try to load a different image from “Inductive Automation\Ignition\webserver\webapps\main” but when i change the old image with the new one the image component only loads the old one.
If I open the page in new browser for the first time it is ok and cache it forever.
Is there any way to disable the caching system of this component?
I just face another problem, when I upload a file in the gateway file system the next time I want to upload and overwrite the file I get this error which file is open and used by java.exe.
> java.io.FileNotFoundException: java.io.FileNotFoundException: webserver\webapps\main\User Image\nader.png (The requested operation cannot be performed on a file with a user-mapped section open)
I simply want to save user profile pictures and user can change their user profile picture.
Yes. That’s a known issue with the webserver/webapps hosting.
It’s also, and I can’t understate this, not something we care to fix. The webserver/webapps hosting method only works by accident. It is not something we explicitly support or guarantee to work between versions.
If you want to expose a folder via Ignition’s webserver, use a Webdev mounted folder.
You can, but it’s going to take some doing via scripting.
The preferred method to have dynamic input/output of images would be a database with BLOB columns.
If that’s not an option, you can push whatever files you want into a Webdev mounted folder.
Image management has some performance concerns (by necessity, it’s using the internal DB that’s also responsible for all of Ignition’s configuration - the more contention you can avoid on the IDB, the better) that mean that I’d avoid it for particularly busy systems.
But I saw in one of your post that using BLOB and converting it to base64 and bind it to image SRC cause performance issue specially for desinger.(put a lot of chars in the SRC property)
I already did that method for small images but Im looking for best option.
The best option (in my opinion) would be a proper webserver connected to a DB to store images, with its own caching mechanism, on the same host as the gateway, behind a reverse proxy so that external connections only see a single port.
You can get a lot of the benefits of that approach by using Webdev (a Python endpoint) attached to a DB. You’ll want to implement your own caching so you’re not always fetching each image from the database, but this could be quite performant.
I do think that there’s room for Ignition to make this better, and I filed a ticket internally a while back for us to do exactly that. However, it’s still incubating - we’re figuring out exactly what approach we want to take.