# Secure way to serve blobs to Perspective PDF viewer

**URL:** <https://forum.inductiveautomation.com/t/secure-way-to-serve-blobs-to-perspective-pdf-viewer/109828>\
**Category:** Ignition\
**Tags:** perspective, ignition81, webdev\
**Created:** [August 15, 2025, 5:45pm UTC](https://forum.inductiveautomation.com/t/secure-way-to-serve-blobs-to-perspective-pdf-viewer/109828 "2025-08-15T17:45:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [August 15, 2025, 5:45pm UTC](https://forum.inductiveautomation.com/t/secure-way-to-serve-blobs-to-perspective-pdf-viewer/109828/1 "2025-08-15T17:45:43Z")

</div>

I’m not sure if I’m missing something or if this is just not possible.

I have PDF blobs stored in a database and I use a _doGet_ Python resourced in the WebDev module to serve them to a Perspective PDF Viewer component. This all works.

This is my dilemma. I want 2 things:

1. Let a user who is logged into a Perspective session see the PDF on a page.
2. Not expose the PDF to just anyone on the network that happens to obtain the correct url.

I could require authentication on the handler so that someone with the correct url cannot just type it into the browser and get the file but will be prompted to authenticate. However, this also prompts the (already logged in) user to authenticate in the Perspective Session as well... which is terrible for user experience.

As far as I can tell there is no way to pass the Perspective authentication through with the GET request. I can think of ways to hack together the use of some "middle man" service account perhaps if I were scripting this, but not really using a PDF viewer.

What is the best practice here?

---

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [August 15, 2025, 6:09pm UTC](https://forum.inductiveautomation.com/t/secure-way-to-serve-blobs-to-perspective-pdf-viewer/109828/2 "2025-08-15T18:09:30Z")

</div>

> [@djs](#):
>
> hack together

> [@djs](#):
>
> best practice

Quite the oxymoron 😆

Could you have a secret token that the authenticated perspective session would have access to and pass that with the URL?

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [August 15, 2025, 6:14pm UTC](https://forum.inductiveautomation.com/t/secure-way-to-serve-blobs-to-perspective-pdf-viewer/109828/3 "2025-08-15T18:14:33Z")

</div>

> [@djs](#):
>
> I have PDF blobs stored in a database

Surely you can get rid of webdev and message the data across to the perspective session inside the ignition environment?

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [August 15, 2025, 6:24pm UTC](https://forum.inductiveautomation.com/t/secure-way-to-serve-blobs-to-perspective-pdf-viewer/109828/4 "2025-08-15T18:24:18Z")

</div>

> [@David\_Stone](#):
>
> Surely you can get rid of webdev and message the data across to the perspective session inside the ignition environment?

Could you expand on what you mean?

The [documentation](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-pdf-viewer#properties) for the component specifies that it expects a url to a pdf hosted on a web server.

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

I understand that I could get the bytes from the DB myself and let the user download them, but I'm not sure how to pass them to the PDF Component if it expects a url.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [August 15, 2025, 6:29pm UTC](https://forum.inductiveautomation.com/t/secure-way-to-serve-blobs-to-perspective-pdf-viewer/109828/5 "2025-08-15T18:29:55Z")

</div>

> [@Perspective PDF Viewer to Display a object stored as Bytes in DB](https://forum.inductiveautomation.com/t/perspective-pdf-viewer-to-display-a-object-stored-as-bytes-in-db/58625):
>
> I feel really frustrated. I have used Travis Cox Exchange Project to Upload my PDF File to a DB. I have a query that will return the scalar of the PDF Bytes. How do I get that to display in a perspective window? I have searched and apologize if it is explained somewhere else.

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [August 15, 2025, 6:47pm UTC](https://forum.inductiveautomation.com/t/secure-way-to-serve-blobs-to-perspective-pdf-viewer/109828/6 "2025-08-15T18:47:37Z")

</div>

The linked solution still uses a web server, it just happens to be Phil Turmel's BlobServer module rather than the WebDev module. The documentation for his module implies that it respects NamedQuery security settings, I'll do some testing.
