# \[IGN-4288\] File Upload In Progress

**URL:** <https://forum.inductiveautomation.com/t/ign-4288-file-upload-in-progress/36556>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 9, 2020, 9:02pm UTC](https://forum.inductiveautomation.com/t/ign-4288-file-upload-in-progress/36556 "2020-07-09T21:02:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [July 9, 2020, 9:02pm UTC](https://forum.inductiveautomation.com/t/ign-4288-file-upload-in-progress/36556/1 "2020-07-09T21:02:38Z")

</div>

Does anyone have a solution to know when a file being uploaded is still uploading?  
I'm trying to disable a button while files are being uploaded. I tried using the onFileReceived event but the button is disabled after the file has been uploaded.

Thanks.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [July 9, 2020, 9:22pm UTC](https://forum.inductiveautomation.com/t/ign-4288-file-upload-in-progress/36556/2 "2020-07-09T21:22:45Z")

</div>

What does the code within your onFileReceived Event look like?

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [July 10, 2020, 12:06pm UTC](https://forum.inductiveautomation.com/t/ign-4288-file-upload-in-progress/36556/3 "2020-07-10T12:06:05Z")

</div>

@cmallonee

```auto
self.getSibling("Button").props.enabled = False # this executes after the 1st file is uploaded
fileName = event.file.name
fileBytes = event.file.getBytes()
query = "INSERT INTO table (fileName, fileBytes) VALUES (?, ?)"
args = [fileName, fileBytes]
system.db.runPrepUpdate(query, args)

```

Edit: I think the event trigger makes sense (onFilesReceive **d** ). Almost need another event onFilesReceiving that would trigger when the component starts uploading the file to the gateway?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [July 10, 2020, 4:30pm UTC](https://forum.inductiveautomation.com/t/ign-4288-file-upload-in-progress/36556/4 "2020-07-10T16:30:48Z")

</div>

I think we could benefit from `onFileSubmit` and `onSubmitComplete` Events which fire before any files are uploaded and then after all file have completed (whether they all succeeded or not). I’ve reached out to a Dev to see if these Events would be possible. FOr now we don’t see a good way for you to disable a button when the uploads start and then enable when the uploads complete.

```auto
self.getSibling("Button").props.enabled = False # this executes after the 1st file is uploaded
fileName = event.file.name
fileBytes = event.file.getBytes()
query = "INSERT INTO table (fileName, fileBytes) VALUES (?, ?)"
args = [fileName, fileBytes]
system.db.runPrepUpdate(query, args)
self.getSibling("Button").props.enabled = True

```

Would sort of work, but I suspect the state of the button would flicker between files as it enables upon completion and then immediately becomes disabled. This did NOT occur when I tested it (the transition was so fast that it couldn’t even be seen, though logging did indicate the button toggled state).

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [July 10, 2020, 4:34pm UTC](https://forum.inductiveautomation.com/t/ign-4288-file-upload-in-progress/36556/5 "2020-07-10T16:34:26Z")

</div>

Those additional events would be great. Not a deal breaker by any means but would be nice to have.

Thanks for reaching out.

---

<div class="post-metadata">

**Author:** ![Ajay\_Gupta](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@Ajay\_Gupta](https://forum.inductiveautomation.com/u/Ajay_Gupta)\
**Post date:** [September 22, 2025, 3:27pm UTC](https://forum.inductiveautomation.com/t/ign-4288-file-upload-in-progress/36556/6 "2025-09-22T15:27:52Z")

</div>

@cmallonee Any plan to release these event?  
I am in a similar situation and can not find a solution.

Thanks,  
Ajay

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [September 22, 2025, 5:16pm UTC](https://forum.inductiveautomation.com/t/ign-4288-file-upload-in-progress/36556/7 "2025-09-22T17:16:36Z")

</div>

I was able to locate the feature request I opened for this thread. I’ve updated it with a note about additional interest, but it’s unlikely to move much anytime soon as there hasn’t been any push for it in the five years the ticket has been open.
