# Update query for file upload component

**URL:** <https://forum.inductiveautomation.com/t/update-query-for-file-upload-component/87266>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 13, 2024, 1:09pm UTC](https://forum.inductiveautomation.com/t/update-query-for-file-upload-component/87266 "2024-03-13T13:09:27Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Ben522326](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Ben522326](https://forum.inductiveautomation.com/u/Ben522326)\
**Post date:** [March 13, 2024, 7:13pm UTC](https://forum.inductiveautomation.com/t/update-query-for-file-upload-component/87266/4 "2024-03-13T19:13:02Z")

</div>

This ended up being my solution...

> [@Ignition File Upload Component](https://forum.inductiveautomation.com/t/ignition-file-upload-component/79044/4):
>
> 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 gl…

---

_[View the full topic](https://forum.inductiveautomation.com/t/update-query-for-file-upload-component/87266)._
