# Automation Professionals' Blob Server Module

**URL:** <https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970>\
**Category:** 3rd Party Modules\
**Tags:** ignition81, ignition83, perspective, database\
**Created:** [April 2, 2022, 7:16pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970 "2022-04-02T19:16:08Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![ryoungk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryoungk/32/24205_2.png) [@ryoungk](https://forum.inductiveautomation.com/u/ryoungk)\
**Post date:** [August 11, 2022, 4:56pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/21 "2022-08-11T16:56:05Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ryoungk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryoungk/32/24205_2.png) [@ryoungk](https://forum.inductiveautomation.com/u/ryoungk)\
**Post date:** [August 12, 2022, 1:34pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/22 "2022-08-12T13:34:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [September 27, 2022, 2:47am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/23 "2022-09-27T02:47:14Z")

</div>

> [@pturmel](#):
>
> Are you appending the base64 instead?

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/6/f68f5fc463c3a9686c1aec425ae7bacd4ffa0b40.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/6/46de3714b3500aafea9355e6b6ecfac8b9a8010a.jpeg)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/4/e417d46db5d144c59e4964387864c7201e777516.jpeg)  
here is the URL  
'[http://192.168.7.51:8088/system/blob/CTLOperator/Picture?id=18](http://192.168.7.51:8088/system/blob/CTLOperator/Picture?id=18)'

This is Named Query

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/1/71fead7ed91531be64b9299685ef3f236dc322c4.png)

here is the named query code

```auto
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?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 27, 2022, 11:37am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/24 "2022-09-27T11:37:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [September 28, 2022, 2:16am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/25 "2022-09-28T02:16:18Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/c/3c5c7b98ade9216ab4cd0b60617c6b179792e6bb.png)

but failed

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/3/73d92670ce8f7d61a5e38bb09ff4334e33497e2c.png)

can this URL bind to the image?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 28, 2022, 12:32pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/26 "2022-09-28T12:32:02Z")

</div>

Don’t use an HTTP _binding_. Just provide the url to the `source` property as _text_.

---

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [September 29, 2022, 3:09am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/27 "2022-09-29T03:09:29Z")

</div>

It works, thanks a lot, very powerful module

---

<div class="post-metadata">

**Author:** ![damien.cacheux](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@damien.cacheux](https://forum.inductiveautomation.com/u/damien.cacheux)\
**Post date:** [October 17, 2022, 2:35pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/28 "2022-10-17T14:35:37Z")

</div>

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](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/7/d72becf100da1c41c9f1b94f0749a573ba358ea9.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/b/2bdb0c39cb1f571d2f06dd91a8cfc947c6f3a795.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5d1bd8ffab4ef47288aad2d0268d945d9cacf05f.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/0/202f054005e766230508b9c14458176f682a648d.png)

Thanks

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 17, 2022, 5:07pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/29 "2022-10-17T17:07:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![damien.cacheux](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@damien.cacheux](https://forum.inductiveautomation.com/u/damien.cacheux)\
**Post date:** [October 18, 2022, 1:25pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/30 "2022-10-18T13:25:38Z")

</div>

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](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/d/bdd76d9e34405208e848d49f283568e147ae782d.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 18, 2022, 8:25pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/31 "2022-10-18T20:25:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ken.maze](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ken.maze/32/85876_2.png) [@ken.maze](https://forum.inductiveautomation.com/u/ken.maze)\
**Post date:** [November 15, 2022, 7:09pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/32 "2022-11-15T19:09:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 16, 2022, 2:53am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/33 "2022-11-16T02:53:30Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![ken.maze](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ken.maze/32/85876_2.png) [@ken.maze](https://forum.inductiveautomation.com/u/ken.maze)\
**Post date:** [November 18, 2022, 6:47pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/34 "2022-11-18T18:47:17Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Trenton\_Klocke](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Trenton\_Klocke](https://forum.inductiveautomation.com/u/Trenton_Klocke)\
**Post date:** [January 5, 2023, 9:07pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/35 "2023-01-05T21:07:20Z")

</div>

Phil,

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

> **[Ignition Third-Party Module Showcase](https://inductiveautomation.com/moduleshowcase/)**
>
> Easily extend Ignition's core functionality with Third-Party Modules. The Module Showcase is a great place to find a solution that best meets your needs.

Thanks,  
Trent

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 5, 2023, 10:15pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/36 "2023-01-05T22:15:02Z")

</div>

It has never been in the module showcase. Largely because it is free. The latest download link is in [this comment](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/9) above.

---

<div class="post-metadata">

**Author:** ![drojas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drojas/32/3403_2.png) [@drojas](https://forum.inductiveautomation.com/u/drojas)\
**Post date:** [March 29, 2023, 8:43pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/37 "2023-03-29T20:43:16Z")

</div>

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](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/1/311c2b84f2f133a3725b300ec7bdd9b370399a8b.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 29, 2023, 8:59pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/38 "2023-03-29T20:59:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![drojas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drojas/32/3403_2.png) [@drojas](https://forum.inductiveautomation.com/u/drojas)\
**Post date:** [March 30, 2023, 1:16am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/39 "2023-03-30T01:16:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JohnMck](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@JohnMck](https://forum.inductiveautomation.com/u/JohnMck)\
**Post date:** [April 10, 2023, 1:03am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/40 "2023-04-10T01:03:49Z")

</div>

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](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!

[Previous page](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970.md?page=1)

[Next page](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970.md?page=3)
