# Perspective FileUpload component onFileRecieved event script issue

**URL:** <https://forum.inductiveautomation.com/t/perspective-fileupload-component-onfilerecieved-event-script-issue/98165>\
**Category:** Ignition\
**Tags:** ignition81, scripting, perspective\
**Created:** [November 4, 2024, 11:00pm UTC](https://forum.inductiveautomation.com/t/perspective-fileupload-component-onfilerecieved-event-script-issue/98165 "2024-11-04T23:00:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [November 4, 2024, 11:03pm UTC](https://forum.inductiveautomation.com/t/perspective-fileupload-component-onfilerecieved-event-script-issue/98165/2 "2024-11-04T23:03:09Z")

</div>

The problem was fixed in version 8.1.36.

> [@Nightly 8.1 Changelogs - 2023](https://forum.inductiveautomation.com/t/nightly-8-1-changelogs-2023/68524/176):
>
> Nightly Changelog: 8.1.36-SNAPSHOT-b20231205 Perspective Perspective IGN-8219: Perspective: File Upload Component’s onFileReceived event unexpectedly fires twice when a small file is uploaded Fixed book keeping mistake related to the File Upload component and small file uploads.

If you can't update versions, this post has some workarounds:

> [@Upload component gets file Received Script triggered twice](https://forum.inductiveautomation.com/t/upload-component-gets-file-received-script-triggered-twice/97653/3):
>
> I ran into that issue myself a while back, and came up with this workaround: def runAction(self, event): import java.lang.Exception from threading import Timer # Fixes a bug in Ignition that causes this event to fire twice in a row... def setOkayToUpload(self): self.custom.okayToUpload = True if self.custom.okayToUpload: self.custom.okayToUpload = False ...(process upload)... Timer(0.5, setOkayToUpload, [self]).start()

---

_[View the full topic](https://forum.inductiveautomation.com/t/perspective-fileupload-component-onfilerecieved-event-script-issue/98165)._
