# 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:** 3

<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:** [April 10, 2023, 1:10am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/41 "2023-04-10T01:10:13Z")

</div>

I recommend you test in three steps:

- In the Named Query editor, use test mode with that ID to make sure you get one row, and only one row. Make sure the column names' are the correct mix of upper and lower case. Make sure the project is saved after testing the NQ.

- In a browser tab adjacent to the Perspective session, put the test URL directly into the browser (not an i-frame). You should see the content directly in that tab.

- Only then, test in the Perspective session itself.

For all of these tests, monitor the gateway log looking for related errors.

---

<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, 2:10am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/42 "2023-04-10T02:10:18Z")

</div>

Thanks, Phil.  
My ID parameter in the URL used the wrong case.  
Parameter defined in NQ: "ID"  
Parameter in URL was "id"

---

<div class="post-metadata">

**Author:** ![jmorris](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jmorris](https://forum.inductiveautomation.com/u/jmorris)\
**Post date:** [May 20, 2023, 4:01am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/43 "2023-05-20T04:01:02Z")

</div>

Hi Phil,  
I'm using the module to display a pdf file, it works fine when I test the URL directly into the browser, but If I paste the same URL into the PDF Viewer source, it shows "Fail to load PDF file", any suggestion?  
Thanks!

---

<div class="post-metadata">

**Author:** ![jmorris](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jmorris](https://forum.inductiveautomation.com/u/jmorris)\
**Post date:** [May 20, 2023, 4:19am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/44 "2023-05-20T04:19:26Z")

</div>

I've found I need to remove the Gateway IP and port from the URL, in order for the PDF Viewer to display the document (?)

---

<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:** [May 20, 2023, 10:49am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/45 "2023-05-20T10:49:57Z")

</div>

Hmm. No idea. If it shows in the browser, then the module is working properly. Not sure what quirks are in the PDF Viewer.

---

<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:** [May 22, 2023, 7:27pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/46 "2023-05-22T19:27:23Z")

</div>

Phil, is there any way to add/modify the Content-Disposition header? A browser on my PC opens the PDF file in another tab as expected, but on my mobile device it wants to download the PDF first then open in PDF viewer. I have read that specifying Content-Disposition: inline; as opposed to Content-Disposition: attachment; would solve this. And, it has the added benefit of specifying the filename too. Currently the suggested filename is "GetPDFReport" as that is the name of my named query.

Content-Type: application/pdf  
Content-Disposition: inline; filename="parameterizedfilename.pdf"

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:** [May 22, 2023, 7:42pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/47 "2023-05-22T19:42:31Z")

</div>

Sure. Easy-peasy, I think. Try this:

[v1.1.0.231421939](https://www.automation-pros.com/ignition/Blob%20Serve-1.1.0.231421939-v81.modl)

Return an optional third column, `ContentDisposition`, from your named query with your desired header content. Be sure to embed the quotes into the value if you supply the filename.

---

<div class="post-metadata">

**Author:** ![n099y](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@n099y](https://forum.inductiveautomation.com/u/n099y)\
**Post date:** [August 18, 2023, 12:02am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/48 "2023-08-18T00:02:15Z")

</div>

This is working great for vision also. Thank you a great tool saves a lot of coding.

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [October 23, 2023, 11:04pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/49 "2023-10-23T23:04:56Z")

</div>

@pturmel @JohnMck

I am using SQL Server as John is, and am wondering how to set this up.  
I'm reading through the MSDN docs on FILESTREAM, FileTable, etc. and am not sure if I need to go through all this, as in your module docs, Phil, you didn't mention anything about that.

What I would like to do is allow select users to upload images, PDFs, Word docs to this DB, associate the files with some machine, then view the files.

So, do I need a FILESTREAM enabled Server and the requisites following that on the MSDN? Which also means, at least recommended, having a separate disk volume for the separate server. (I think it said separate server... Maybe just a FILESTREAM enabled server)

Or, is it ok to use a normal server/DB for this job and will it affect performance much considering a small group of users (200 or less)?

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 23, 2023, 11:10pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/50 "2023-10-23T23:10:09Z")

</div>

I avoid Microsoft products like the plague (well, more than **like** a plague) so have not had occasion to set up blob columns. I doubt you need filestream or filetable special handling, but I'm not the one to ask.

I would not expect you to need anything special in your DB, unless you expect to handle hundreds of gigabytes total. If you plan on storing video, consider using a segmenter to store a few seconds per chunk. You definitely do not want to have any blobs that make up more than a percent or two of your gateway's RAM allocation.

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [October 30, 2023, 8:17pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/51 "2023-10-30T20:17:34Z")

</div>

If I understand your blob server correctly, the images (or other files) are actually stored in the DB.

I can setup a DB (MSSQL 🙂 ) with file names, etc., but displaying them I'm not sure about. If I recall correctly, @cmallonee mentioned that images (and perhaps other files) stored outside of the Image Management tool are not supported.

Bottom line is: (should I create a new thread for this question?)  
I want to access and display files/images from a network shared folder in Perspective using MSSQL Server.

Do you (or anyone really) know of a way to access files stored on a network shared folder (which is where we'd like to keep our files) from Ignition?

---

<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 30, 2023, 9:19pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/52 "2023-10-30T21:19:38Z")

</div>

> [@mdemaris](#):
>
> I want to access and display files/images from a network shared folder in Perspective ~~using MSSQL Server~~.

Just use WebDev to access the shared folder (use UNC names for robustness).

My Blob Server will **only** do blobs stored directly in the DB.

---

<div class="post-metadata">

**Author:** ![k-cottos](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@k-cottos](https://forum.inductiveautomation.com/u/k-cottos)\
**Post date:** [November 15, 2023, 10:14pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/53 "2023-11-15T22:14:57Z")

</div>

I need to select my image based on a column called "initials" that contains a string datatype. Anyway to adjust the namedQuery to use a string instead or int? Or can I adjust the query to select the id that corresponds to the initials? Sorry, I'm not a MySQL expert.

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [November 16, 2023, 12:42am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/54 "2023-11-16T00:42:11Z")

</div>

All you need to do is modify the query to fit your data, something like this:

```auto
WHERE initials = :initials

```

:initials being the parameter you pass to the query. You also want to be sure there aren't duplicate initials.

---

<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, 2023, 1:27am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/55 "2023-11-16T01:27:33Z")

</div>

The URL parameters are strings, and are coerced to the NQ parameter value types by the NQ engine. String parameters should work fine.

---

<div class="post-metadata">

**Author:** ![Maria\_P](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Maria\_P](https://forum.inductiveautomation.com/u/Maria_P)\
**Post date:** [February 1, 2024, 6:56am UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/56 "2024-02-01T06:56:58Z")

</div>

Thanks! that worked for me too

---

<div class="post-metadata">

**Author:** ![msitson](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@msitson](https://forum.inductiveautomation.com/u/msitson)\
**Post date:** [February 15, 2024, 5:34pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/57 "2024-02-15T17:34:40Z")

</div>

Hi Phil,

I have implemented the blob server module into my form application. It has been working well. I have run into one problem where I am having trouble pulling files that contain a '#' in the file name. I get an HTTP ERROR 404 Not Found. I was wondering what could be causing this and if there is a possible work around.

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:** [February 15, 2024, 5:36pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/58 "2024-02-15T17:36:22Z")

</div>

That is a special character in URLs. You will have to use URL escaping.

---

<div class="post-metadata">

**Author:** ![msitson](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@msitson](https://forum.inductiveautomation.com/u/msitson)\
**Post date:** [February 15, 2024, 5:40pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/59 "2024-02-15T17:40:01Z")

</div>

I have the file name saved in a separate column that the query utilizes. I have tried removing the # from the file name so that the URL would no longer include the #, but the error is still present.

---

<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:** [February 15, 2024, 5:45pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/60 "2024-02-15T17:45:57Z")

</div>

Replace the `#` in the URL with `%23`, the encoded form of the hash mark. Use urlencoding in your scripts to auto-general these URL parameters. (It isn't just the hash mark that needs such treatment.)

[https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html](https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html)

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

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