Automation Professionals' Blob Server Module

You are right. Finally got it to work and the page load sped up significantly when I removed the images from the table query. This is super helpful!

There are two images in this table so I have created two named queries with different column names. Any idea why the 2nd column just won’t show up? Maybe the table doesn’t allow duplicate column names? Is there a way around this?

Hey! I figured it out. Just created an additional column in the table with a different name. Thanks pturmel! I will make sure to leave a tip. <3

1 Like

I don't know what this means?
I have try to use your module




here is the URL
'http://192.168.7.51:8088/system/blob/CTLOperator/Picture?id=18'

This is Named Query

here is the named query code

SELECT filedata as "Content" ,'image/png' as 'ContentType'
FROM [dbo].[UploadFile]
WHERE id=:id

can you help to tell me , how to improve the code to improve the url load speed?

Sounds like your database isn’t powerful enough. Or gateway. I don’t see any obvious reason why it wouldn’t work well.

I use this URL in the gateway Chrome it will no delay , but in other PC side, it will use 3-4s to show the total picture

I have try to use this url binding to the perspective image

but failed

can this URL bind to the image?

Don’t use an HTTP binding. Just provide the url to the source property as text.

1 Like

It works, thanks a lot, very powerful module

1 Like

Hi
I'm trying to use your module to display PFD files
I didn't find my mistake. Could you have a look and guide me please

image

image

Thanks

1 Like

In your SQL, you have the column name for ContentType in single quotes. That is not valid SQL. Use double quotes for identifiers like schema, table, and column names.

Did you test your named query in the designer?

The query worked fine, I got a row in the designer.
I changed quotes in SQL and change the url path (the project name was missing).
The blob serve module is running fine as well.
But no more data in PDF viewer

Only the error message have changed
image

Did you save your project after fixing the named query? The Blob Server cannot work with unsaved changes. The Blob Server deliberately reports 404 when it gets no row or gets more than one.

Hi Phil, I hate to mention this after all the talk about it being free, and whether you should charge for it, etc, but the certificate on it expired on 7/8/22, 1:36:51 PM.

Yeah, I'm aware. I'll be generating a new certificate for my next batch of module updates. (Not going to buy one this time--Ignition itself doesn't care.)

1 Like

I can confirm it is working great for me, don't have it in a production environment yet, but it is working fine in test. And yeah, Ignition doesn't seem to care about that certificate.

Thanks!

Phil,

Is this Blob module still available? I wasn't able to locate it in the Module Showcase.

Thanks,
Trent

It has never been in the module showcase. Largely because it is free. The latest download link is in this comment above.

1 Like

Hi Phil,
I am wondering how the Blob Serve module handles a Named Query with "Database Connection" set to <Parameter>. If Parameter is selected, the query will expect a "database" argument, but the Blob Serve documentation specifies that it silently ignores any extra parameters. Perhaps allow "database" as another valid argument?
For the time being, I'll just put all files into 1 database.

image

Good catch! I'll look at what it takes to do this.

Edit: Hmmm. I'm already allowing extra keys from the HTTP query string into the map the Named Query manager pulls the parameters from to execute. Not sure what I'm missing. In other words, the Named Query .execute() method does the silent ignoring for me. What have you tried?

Well, I just tried it out and it worked as expected. .../GetReport?database=somedatabase&id=someid
Sorry about that...I was reading up on things before writing the code to see if it was even possible.
This is great, now I can move all the pdf files back into their respective databases.

1 Like

Phil -
First off, thanks for all your assistance in the forum. Your various comments and suggestions have saved me hours, if not days, of trial and error!

Question on the blob module for PDF viewing in Perspective:

I'm getting the same result as Damien (oct 2022 post)

Using MSSQLServer, I have a database table to store the record ID (autoinc), filename (varchar), data (varbinary), and datatype (varchar) for uploaded PDF files. I use the FileUpload component in perspective to get the file, and the component's onFileReceived event.file.getBytes() method to get the byte array. The upload to the database appears to work well.

Following your doc for use of the blob module, I have a named query that retrieves the data as 'Content' and datatype as 'ContentType' based on a record ID. ContentType is "application/pdf". The named query properly returns a single row with the correct column headings and what appears to be valid data.

I created a simple application for testing (gateway = localhost:8088). The project name is 'MyTest'. The named query for retrieval is at the path "GetPdfFile" in the Named Query root path.

So, the path that I put into the source property for the PDFViewer component to retrieve record ID 14 is:
"http://localhost:8088/system/blob/MyTest/GetPdfFile?id=14" (no quotes)
The PDFViewer displays "Failed to load PDF File".

If I use the same URL in the src property of an i-Frame, I get a 404 error.

Any words of wisdom on what I'm missing?

Thanks!