I am using a file upload component in perspective to upload multiple images and I want to save those uploaded images to my database. How can I do that that?
Thank You
I am using a file upload component in perspective to upload multiple images and I want to save those uploaded images to my database. How can I do that that?
Thank You
I would,
configure an onFileReceived event script and invoke event.file.getBytes() and send to DB as blob
It worked, thank you and now I am trying to retrieve the saved image from database and show it in image component in perspective. I tried different ways but none of them seems working.
I am new in ignition, I don’t know how to achieve that using webdev, if you could help me with that then it will be really helpful.
Thank you.
What kind of DB are you using?
MySQL
If they’re small. You would query them out as base 64. with TO_BASE64(col)
In Jordan’s post, it goes over that.
You could also store them straight to the directory. Something like
upload_path = 'webserver/webapps/main/'
event.file.copyTo(upload_path + event.file.name)