Ignition File Upload Component

I've had a similar challenge before, where I had a user form for an event log entry with an optional report upload. I got around it by temporarily storing the file in a global variable dictionary in the onFileReceived event:

self.custom.fileName = event.file.name
system.util.getGlobals()[event.file.name] = event.file.getBytes()

That way I could do a single insert query into the database with the form data and file upon form completion. I also had an onShutdown event on the view to clear the global variable.

4 Likes