Upload component gets file Received Script triggered twice

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()