# onFileReceived call twice on FileUpload component

**URL:** <https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563>\
**Category:** Ignition Early Access\
**Created:** [May 8, 2020, 10:37am UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563 "2020-05-08T10:37:30Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [May 14, 2020, 3:13am UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/21 "2020-05-14T03:13:55Z")

</div>

@PerryAJ `~/.ignition` cache folder for me

---

<div class="post-metadata">

**Author:** ![PerryAJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/perryaj/32/3281_2.png) [@PerryAJ](https://forum.inductiveautomation.com/u/PerryAJ)\
**Post date:** [May 14, 2020, 3:17pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/22 "2020-05-14T15:17:59Z")

</div>

Thanks for the clarification. We’ll do some looking - we aren’t intentionally caching anything I can think of that would lead to this behavior. Given that, it’s a bit of ‘finding a needle in a haystack’, except that we don’t even know what the needle looks like.

Either way, do keep us updated if this behavior returns.

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [June 18, 2020, 9:52pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/23 "2020-06-18T21:52:17Z")

</div>

@PerryAJ@jball

Hey guys, I’ve had this behavior occur again in the same view it was in previously.

I decided to test a few different devices (both laptops and mobile devices) and this issue wasn’t occurring on any of them.

I then decided to clear my browser cache and that fixed the issue. I didn’t have to clear the `~/.ignition` cache at all.

Not sure if this brings any insight to the issue, or if it’s still a case of ‘finding a needle in a haystack’ (because it doesn’t make sense why browser cache would cause an event to fire twice?), but regardless, I hope it helps!

---

<div class="post-metadata">

**Author:** ![jball](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jball/32/11128_2.png) [@jball](https://forum.inductiveautomation.com/u/jball)\
**Post date:** [June 18, 2020, 10:06pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/24 "2020-06-18T22:06:24Z")

</div>

Huh… That makes the issue even stranger as nothing in that component is saved to browser cache, and it would be very unlikely that the upload response could/would get cached and trigger that event multiple times. I appreciate the update Mathew; we can certainly take that information back.

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [June 18, 2020, 10:37pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/25 "2020-06-18T22:37:44Z")

</div>

I’m not sure how you guys are handing events, but with my general searches i found numerous posts when searching ‘react event firing twice’, though i’m not sure if they pertain in this instance.

---

<div class="post-metadata">

**Author:** ![jball](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jball/32/11128_2.png) [@jball](https://forum.inductiveautomation.com/u/jball)\
**Post date:** [June 22, 2020, 4:22pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/26 "2020-06-22T16:22:15Z")

</div>

In this case, the event is coming back via the web socket and React doesn’t play much of a part, other than acting as a proxy. Many (but not all) of the component events work this way.

---

<div class="post-metadata">

**Author:** ![n.sabel](https://avatars.discourse-cdn.com/v4/letter/n/df705f/32.png) [@n.sabel](https://forum.inductiveautomation.com/u/n.sabel)\
**Post date:** [November 8, 2023, 10:48pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/27 "2023-11-08T22:48:32Z")

</div>

Has anyone come up with a decent solution to this problem? I have this happen daily and clearing the browser and/or ~ignition cache does not fix the issue. However one thing of note this only happens for users onsite. Any user that connects in via VPN does not have this problem.

---

<div class="post-metadata">

**Author:** ![wrooney](https://avatars.discourse-cdn.com/v4/letter/w/ce7236/32.png) [@wrooney](https://forum.inductiveautomation.com/u/wrooney)\
**Post date:** [January 5, 2024, 2:28am UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/28 "2024-01-05T02:28:17Z")

</div>

I am experiencing this as well on 8.1.32. I was able to work around it by staging the files in a hash map. The only downside is that the users have to upload the files and then also hit a save button to save the staged files.  
[IgnitionPerspective\_FileUploadComponent.zip](https://forum.inductiveautomation.com/uploads/short-url/xXMdKCM8McngLXxckOoWOFXqQEb.zip) (7.7 KB)

---

<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:** [January 5, 2024, 3:18am UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/29 "2024-01-05T03:18:40Z")

</div>

This was fixed as part of [8.1.36](https://inductiveautomation.com/downloads/releasenotes/8.1.36#:~:text=Fixed%20book%20keeping%20mistake).

---

<div class="post-metadata">

**Author:** ![Carter\_Wente](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@Carter\_Wente](https://forum.inductiveautomation.com/u/Carter_Wente)\
**Post date:** [April 17, 2024, 1:49pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/30 "2024-04-17T13:49:53Z")

</div>

Ran into this issue as well and I am using 8.1.36.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/1/d10e0e1fca3e538b7b66404f9ae312eef0ecdb6a.png)  
[RepetitiveFiring.zip](https://forum.inductiveautomation.com/uploads/short-url/FyvbvRHz6pKpwEaOE9Zjo7nzuQ.zip) (63.2 KB)

---

<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 17, 2024, 1:54pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/31 "2024-04-17T13:54:01Z")

</div>

Are you re-using that upload component without clearing its prior uploads? That can cause this, too.

---

<div class="post-metadata">

**Author:** ![Carter\_Wente](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@Carter\_Wente](https://forum.inductiveautomation.com/u/Carter_Wente)\
**Post date:** [April 17, 2024, 1:55pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/32 "2024-04-17T13:55:07Z")

</div>

No I am not, I will give that a try thank you @pturmel

---

<div class="post-metadata">

**Author:** ![Carter\_Wente](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@Carter\_Wente](https://forum.inductiveautomation.com/u/Carter_Wente)\
**Post date:** [April 17, 2024, 1:57pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/33 "2024-04-17T13:57:49Z")

</div>

Yeah that didn't work

---

<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:** [April 17, 2024, 3:44pm UTC](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563/34 "2024-04-17T15:44:47Z")

</div>

8.1.36 Nightly, or Release? Can you explain what the logging you supplied is supposed to convey to us?

[Previous page](https://forum.inductiveautomation.com/t/onfilereceived-call-twice-on-fileupload-component/34563.md?page=1)
