# File Upload in Perspective CSV to database

**URL:** <https://forum.inductiveautomation.com/t/file-upload-in-perspective-csv-to-database/42813>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [February 1, 2021, 1:27pm UTC](https://forum.inductiveautomation.com/t/file-upload-in-perspective-csv-to-database/42813 "2021-02-01T13:27:10Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [February 8, 2021, 6:00pm UTC](https://forum.inductiveautomation.com/t/file-upload-in-perspective-csv-to-database/42813/7 "2021-02-08T18:00:12Z")

</div>

Or use the builtin StringIO, as in this thread dealing with the exact same issue:

> [@Perspective onFileReceived - CSV](http://forum.inductiveautomation.com/t/perspective-onfilereceived-csv/39893/3):
>
> Awesome - Felt I was close just couldn’t find what I needed. Should have asked sooner slight_smile FYI for future readers below was the updated script to make it work from perspective from StringIO import StringIO import csv fileContents = event.file.getString("UTF-8") reader = csv.DictReader(StringIO(fileContents)) for row in reader: system.perspective.print(row) Thanks again!

---

_[View the full topic](https://forum.inductiveautomation.com/t/file-upload-in-perspective-csv-to-database/42813)._
