# How to upload a file in gateway file system

**URL:** <https://forum.inductiveautomation.com/t/how-to-upload-a-file-in-gateway-file-system/58397>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [April 13, 2022, 5:10am UTC](https://forum.inductiveautomation.com/t/how-to-upload-a-file-in-gateway-file-system/58397 "2022-04-13T05:10:44Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 27, 2023, 5:37pm UTC](https://forum.inductiveautomation.com/t/how-to-upload-a-file-in-gateway-file-system/58397/12 "2023-01-27T17:37:21Z")

</div>

> [@Perspective onFileReceived - CSV](https://forum.inductiveautomation.com/t/perspective-onfilereceived-csv/39893/2):
>
> If you want to use Python’s built-in csv module, you need to construct a file-like object to pass to the reader. Luckily, Python also predicted the idea of interpreting a string in memory as a ‘file-like’ object, so the StringIO module already exists. What you want is probably something like this: from StringIO import StringIO fileContents = event.file.getString("UTF-8") reader = csv.DictReader(StringIO(fileContents)) for row in reader: print row

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-upload-a-file-in-gateway-file-system/58397)._
