# Using Web Dev module or Perspective to create an internal file upload portal

**URL:** <https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 5, 2024, 5:43pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438 "2024-04-05T17:43:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bushmatic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bushmatic/32/87014_2.png) [@Bushmatic](https://forum.inductiveautomation.com/u/Bushmatic)\
**Post date:** [April 5, 2024, 5:43pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/1 "2024-04-05T17:43:04Z")

</div>

I need to allow users to upload a file (a pdf, or possibly a Microsoft Word document) to a central file repository through Ignition. The reason we would like to do this "through" Ignition is to keep track of the quantity and status (and any other details) of these files, apply metrics, and so on.

Not sure how to get started though. Is a Perspective application the way forward, or mounting something using the Web Dev module, or something else? Even just a brief description of what steps you might take and what variables should be considered should help me greatly. I'm imagining creating a simple folder in our shared drive (which Ignition has access to) where these files would get dropped into, with a defined naming convention to help keep track of everything. Where I get stuck is figuring out how to allow users to put files in here using an Ignition-based resource that will run a database insertion at each upload.

---

<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:** [April 5, 2024, 6:00pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/2 "2024-04-05T18:00:51Z")

</div>

Have you looked at the perspective file upload component?

> **[Perspective - File Upload | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-input-palette/perspective-file-upload)**
>
> The File Upload component allows users to upload files to the Gateway or other locations from a Perspective session using a script action on the onFileReceived component event.

You can restrict the size, file type and number of files and then save the file to any location the gateway services has access to in the onFileReceived event. You can also do your database insert on the same event.

If you want to use a network drive i would make sure the account that the ignition service runs has permission and use the UNC path.

---

<div class="post-metadata">

**Author:** ![Bushmatic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bushmatic/32/87014_2.png) [@Bushmatic](https://forum.inductiveautomation.com/u/Bushmatic)\
**Post date:** [April 5, 2024, 6:12pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/3 "2024-04-05T18:12:12Z")

</div>

I didn't know about that... I guess that answers my question 😂

Thank you! I'll try it out and post back here if I hit any roadblocks...

---

<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 5, 2024, 6:46pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/4 "2024-04-05T18:46:55Z")

</div>

The key to the whole thing isn't so much the upload task, but how you then want to control retrieval. If you need to expose direct URLs controlled by Ignition to the previously-uploaded files, you need either the WebDev module (a general solution) or my Blob Server module (if the content is stored as blobs in a database). If, instead, you are happy to let external servers (file, web, whatever) provide that access, nothing further is needed in Ignition. Finally, you can always use `system.perspective.download()` in a button script to expose the files via Perspective button actions.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 19, 2025, 12:37pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/5 "2025-02-19T12:37:34Z")

</div>

Hi Phil,  
Speaking of retrieval.  
Can I retrieve blob file on database with a URL, similar to what blobserve module provides, without using your blobserve module?

Can we do this using web dev? If yes, does that mean blob data will have to be moved first in web dev mounted storage, then determine its UNC path, every time user access this blob?

The reason I ask is, I really like the convenience (and less dependency) that your module provides (skip the inconvenience of webdev), but for some strict (future) clients, I like to avoid explaining stake holder why we need a third party module.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 19, 2025, 1:13pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/6 "2025-02-19T13:13:35Z")

</div>

@Eugene49 maybe through this? Altho also isnt without issues (on windows)

> [@Image manager - storing images dynamically](https://forum.inductiveautomation.com/t/image-manager-storing-images-dynamically/91770/25):
>
> @Thomas_Salisburymage You can store images (or any files) for perspective here: C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main and access them with /image.png or http://example:8088/image.png Note that the browser might cache these images, so if you plan on modifying one certain file often you will have to change its name. You can not that easily delete them though (on windows), because java locks them, but i got something for that here.

---

<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 19, 2025, 1:27pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/7 "2025-02-19T13:27:55Z")

</div>

Yes, you can have a jython WebDev resource prepare and run a NQ just like my blob server does.

> [@Eugene49](#):
>
> avoid explaining stake holder why we need a third party module.

I am totally _ **unsympathetic** _. Third party modules are a necessity for Perspective development, IMNSHO, particularly for performant charting (Apex, Embr) and data manipulation (my Integration Toolkit). Avoiding these does your clients a disservice.

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [February 19, 2025, 1:54pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/8 "2025-02-19T13:54:26Z")

</div>

> [@pturmel](#):
>
> I am totally _ **unsympathetic** _. Third party modules are a necessity for Perspective development, IMNSHO, particularly for performant charting (Apex, Embr) and data manipulation (my Integration Toolkit).

And just because a module is “free” doesn’t mean the support _has_ to be free or best-effort only.

Money can be exchanged for goods and services.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 21, 2025, 3:26am UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/9 "2025-02-21T03:26:45Z")

</div>

> [@pturmel](#):
>
> The key to the whole thing isn't so much the upload task, but how you then want to control retrieval.

First I want to thank you. Web Dev been haunting me for so long - how to make it work. Above comment kept circling on my mind. At the end of the day, I laughed. "is this it? ... and it really is" - its about, end point, its about mounting a resource (python, folder, etc) at the end point, its a retrieval.

They should just renamed "mounted folder" to folder. This gave me major confusion, when manual says, you can mount a Python resource.

Question:  
Why do we need to mount a folder, if gateway have access to its file system, and read the bytes, then respond the bytes?

And why does, designer on client side, when mounting a folder will open the clients file system (probably mounting to a common shared drive)?

I'm still laughing (in a good way). After all this time, it just this.

---

<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 21, 2025, 12:46pm UTC](https://forum.inductiveautomation.com/t/using-web-dev-module-or-perspective-to-create-an-internal-file-upload-portal/88438/10 "2025-02-21T12:46:43Z")

</div>

> [@Eugene49](#):
>
> Why do we need to mount a folder

Because letting java do this natively is far more performant than spinning up some jython for every request. If all you want to do is serve files from a folder through web URLs.

> [@Eugene49](#):
>
> when mounting a folder will open the clients file system

No, "mounting" doesn't happen on the client side at all. The designer's script console is Vision Client scope, and its JVM naturally accesses files in that scope.
