Hello guys,
I am using Ignition 8.1.45 with Perspective module.
I want to create a form that store an image into a MySQL blob field. I created a view and a NamedQuery to insert the image (by an upload file component), query is ok and data is inserted in the table.
When trying to display in an image component is impossible to show the image.
I created a view with image component, a NamedQuery that returns the data from the database table and then a transform script that convert to base64 the data.
You need to install Phil's Blob Server Module or use the WebDev module. The blob server module is free, so I would go with that one, but if you have restrictions of 3rd party modules, go with webdev.
Hello @dkhayes117, we can't pruchase in this stage webdev module so I am trying to do on my own. Is Blob Server Module not using webdev module to works?
Seems odd that you would need anything additional for this.
If you embed the same image directly to a Perspective view, then inspect the source property of the Image object, is there any difference between the value there and the result of your transform?
Yes I tried but didn't work with previous approach.
Now with Pturmel Blob Server works but I have another problem.
Seems that saving a photo taken from smartphone camera from Ignition Perspective app with 4Mb or more crashes Gateway. Is it possible that passing all ArrayBuffer to the NamedQuery is too much data?
Yep, if you need to store larger images, store them on a filesystem somewhere accessible from Ignition, then store a path or something in the DB to point to the actual file on the filesystem. This keeps the database smaller, and files are easier to manage.