Missing Files - on Files Received on The File Upload Component

Hi everyone,

I am working on an ignition perspective project and I seem to be having a minor issue with file upload component. When I upload more than 15 files I end up with missing files. For example, I'll go to upload 25 files and end up with less than 25 files. If I upload 15 or less files, I see no issues, and I've tested this many many times. Here are some of my properties and some of the functionality tied to the component. I'm not sure if I'm doing something wrong, maybe there's too much going on. I would like some help, but like I said, it's a minor issue we can live with.. Well, a minor issue the end users can live with :sweat_smile:

Component Properties:

  • maxUploads: 30
  • fileSizeLimit: 20

Functionalities in script by order:

  1. When a file is received, a function checks the file name.The file names contain a '^' as a delimiter and to the right of the delimiter is a set of unique numbers. These numbers match a unique id in a database. So the file name is parsed for this unique id and returns that variable.
  2. This variable 'id' is then placed in a function that runs a query and returns data from a SQL DB.
  3. That same function also takes the filedata from the file, the event.file.getBytes(), and then stores the SQL data from previously and the file data in a different SQL table.

MAIN FUNCTION

	def main(_id, rawdata):
		_id = remove_extension(_id)
	   	var = getData(_id)-- RETURNS DATA FROM SQL
	   	asset = ""
	   	sheet = "" 
	   	revision = ""
	   	title = ""
	   	doctype = ""
	   	path = ""
	   	filename = ""
	   	
	   	# RETRIEVING VALUES FROM DATA
	   	for row in range(var.getRowCount()):
		        asset = var.getValueAt(row, "Asset")
		        title = var.getValueAt(row, "Title")
		        sheet = var.getValueAt(row, "Sheet")
		        vendor = var.getValueAt(row, "Vendor")
		        category = var.getValueAt(row, "Category")
		        doctype = docType(var.getValueAt(row, "DocType"))
		        filename = var.getValueAt(row, "FileNameModified")
		        path = var.getValueAt(row, "Path")
		        attachment = rawdata
		        id = var.getValueAt(row, "ID")
		        revision = var.getValueAt(row, "Rev")		       
	  			
		insertIntoDB(asset, title, sheet, vendor, category, doctype, filename, attachment, id, revision)
	#########################################################################################
	# 										MAIN                                            #                                       
	#########################################################################################

	# GETING FILES
	filename = event.file.name
	filename = removeID(filename)
	filedata = event.file.getBytes()	
	
	# MAIN FUNCTION
	main(filename, filedata)
	self.getSibling("Table").refreshBinding("props.data") 

What version of Ignition are you using? There was a bug in the component, fixed in 8.1.36, with many uploads happening in rapid sequence.

2 Likes

We are using Version: 8.1.42

Hmm, well, that rules that out. Maybe just start with debug logging; check how many times your event handler is actually being called? And/or contact our support department officially so they can walk through this with you.

1 Like

Thank you, I appreciate the help!