# Gateway Files in Vision

**URL:** <https://forum.inductiveautomation.com/t/gateway-files-in-vision/70394>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [February 27, 2023, 10:23pm UTC](https://forum.inductiveautomation.com/t/gateway-files-in-vision/70394 "2023-02-27T22:23:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpanici](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@cpanici](https://forum.inductiveautomation.com/u/cpanici)\
**Post date:** [February 27, 2023, 10:23pm UTC](https://forum.inductiveautomation.com/t/gateway-files-in-vision/70394/1 "2023-02-27T22:23:18Z")

</div>

Hello, I'd like to somehow use the file explorer to browse files on the gateway server. I want to store reports on the server and have the operators each be able to access them on clients. That would mean the operator browsing to a file on the server, then the PDF viewer opening that file on the same gateway server.

It appears that the file explorer and pdf viewer is limited to the client file system though? Is there any configuration that I am missing with these, or possibly another object that would work for what I need?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 27, 2023, 10:30pm UTC](https://forum.inductiveautomation.com/t/gateway-files-in-vision/70394/2 "2023-02-27T22:30:36Z")

</div>

This is a _big_ security risk if you're not careful.

Your most secure option is likely going to be to host your files in a _database_, rather than directly on the filesystem; then there's much less risk of file or information disclosure.

Another option is the Webdev module's mounted folders option: [Web Dev - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Web+Dev#WebDev-MountedFolder)  
Mounted folders do _not_ automatically come with directory listing, but you _could_ set something up with a Python endpoint (as long as you're careful about information disclosure, again).

---

<div class="post-metadata">

**Author:** ![cpanici](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@cpanici](https://forum.inductiveautomation.com/u/cpanici)\
**Post date:** [February 27, 2023, 10:35pm UTC](https://forum.inductiveautomation.com/t/gateway-files-in-vision/70394/3 "2023-02-27T22:35:41Z")

</div>

Ok, say I was to host the files in a database. How would I go about viewing them in the PDF viewer?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 27, 2023, 11:11pm UTC](https://forum.inductiveautomation.com/t/gateway-files-in-vision/70394/4 "2023-02-27T23:11:04Z")

</div>

In Vision, run a named query via scripting or otherwise to return the byte array/blob for the PDF you want to display.  
Then load it into the viewer component:  
[https://docs.inductiveautomation.com/display/DOC81/Vision+-+PDF+Viewer+Scripting+Functions](https://docs.inductiveautomation.com/display/DOC81/Vision+-+PDF+Viewer+Scripting+Functions)

---

<div class="post-metadata">

**Author:** ![cpanici](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@cpanici](https://forum.inductiveautomation.com/u/cpanici)\
**Post date:** [February 27, 2023, 11:17pm UTC](https://forum.inductiveautomation.com/t/gateway-files-in-vision/70394/5 "2023-02-27T23:17:35Z")

</div>

Thanks PGriffith!

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [February 28, 2023, 12:18am UTC](https://forum.inductiveautomation.com/t/gateway-files-in-vision/70394/6 "2023-02-28T00:18:21Z")

</div>

We do this (host in a database). If you want some pointers pm me and I can send you some resources.
