# How to check if a file is uploaded or not

**URL:** <https://forum.inductiveautomation.com/t/how-to-check-if-a-file-is-uploaded-or-not/112858>\
**Category:** Ignition\
**Tags:** perspective, ignition81, scripting\
**Created:** [December 17, 2025, 8:55am UTC](https://forum.inductiveautomation.com/t/how-to-check-if-a-file-is-uploaded-or-not/112858 "2025-12-17T08:55:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjanakrishnamurthy](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sanjanakrishnamurthy](https://forum.inductiveautomation.com/u/sanjanakrishnamurthy)\
**Post date:** [December 17, 2025, 8:55am UTC](https://forum.inductiveautomation.com/t/how-to-check-if-a-file-is-uploaded-or-not/112858/1 "2025-12-17T08:55:53Z")

</div>

Hi,

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

Here, I’m prompting the user to upload a file through the file upload component, uploaded file is getting copied to the required path. In the Get button, i’m displaying the file present at the same path. How do i check if the user is actually uploading the file and not clicking the Get button?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 17, 2025, 1:07pm UTC](https://forum.inductiveautomation.com/t/how-to-check-if-a-file-is-uploaded-or-not/112858/2 "2025-12-17T13:07:22Z")

</div>

> [@sanjanakrishnamurthy](#):
>
> How do i check if the user is actually uploading the file and not clicking the Get button?

I’m not sure I understand the question. When a user clicks the get button, it will trigger the events configured on it, so it will know the user pressed the Get button. Similar thing for the file upload, the onFileUploaded event will fire which is attached to the File Upload component.

Maybe this will help?

> **[Download and Upload Files | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-input-palette/perspective-file-upload/download-and-upload-files)**
>
> Downloading and uploading files from a Perspective session typically involves storing and retrieving files from a database. A table will store all of the available files, and each row of the table represents a new file. This allows for long term...

---

<div class="post-metadata">

**Author:** ![sanjanakrishnamurthy](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sanjanakrishnamurthy](https://forum.inductiveautomation.com/u/sanjanakrishnamurthy)\
**Post date:** [December 17, 2025, 2:03pm UTC](https://forum.inductiveautomation.com/t/how-to-check-if-a-file-is-uploaded-or-not/112858/3 "2025-12-17T14:03:35Z")

</div>

The Get button already contains the path that i’m storing the file in… So if the user clicks on the Get button without uploading, the old data will be displaying instead of a popup saying the user has not uploaded a file

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 17, 2025, 2:28pm UTC](https://forum.inductiveautomation.com/t/how-to-check-if-a-file-is-uploaded-or-not/112858/4 "2025-12-17T14:28:44Z")

</div>

I don't understand the problem either, but I'd suggest that you need to copy the filename and anything else that would help identify that file uniquely (filesize, timestamp, etc.) into a session variable. Then have the Get script retrieve that info from the server and compare it with the session variable. This should mean that it supports multiple clients too.

---

<div class="post-metadata">

**Author:** ![sanjanakrishnamurthy](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sanjanakrishnamurthy](https://forum.inductiveautomation.com/u/sanjanakrishnamurthy)\
**Post date:** [December 18, 2025, 3:15am UTC](https://forum.inductiveautomation.com/t/how-to-check-if-a-file-is-uploaded-or-not/112858/5 "2025-12-18T03:15:28Z")

</div>

Custom properties helped… On shutdown, i had to reset it
