# Ignition File Upload Component

**URL:** <https://forum.inductiveautomation.com/t/ignition-file-upload-component/79044>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 12, 2023, 10:02pm UTC](https://forum.inductiveautomation.com/t/ignition-file-upload-component/79044 "2023-09-12T22:02:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![amy.sudibyo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amy.sudibyo/32/38659_2.png) [@amy.sudibyo](https://forum.inductiveautomation.com/u/amy.sudibyo)\
**Post date:** [September 12, 2023, 11:17pm UTC](https://forum.inductiveautomation.com/t/ignition-file-upload-component/79044/4 "2023-09-12T23:17:08Z")

</div>

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:

```auto
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.

---

_[View the full topic](https://forum.inductiveautomation.com/t/ignition-file-upload-component/79044)._
