How to download a BLOB Data in Ignition

Hi I write to you, because a need a guide to know how can I do for downloading a specific file from a BLOB table in MySQL.
I found how to insert or upload the file with system.db.runPrepUpdate() script but now, I need to downoload the file from the BLOB table.

Can you help me please with this problem? :unamused:

I will appreciate it a lot

Best Regards

Carito

You can use the system.db.runPrepQuery function. Here is an example:result = system.db.runPrepQuery("SELECT Blob FROM Table WHERE ID = ?", [id]) if len(result): blob = result[0][0] # You can now use the blob for whatever you want system.file.writeFile("C:\\Some\\Path\\to\\File.ext", blob)

Thank you very much!!! Travis :prayer: :thumb_left: It’s works very well :slight_smile:

Best Regards

Carito