# File Upload Perspective

**URL:** <https://forum.inductiveautomation.com/t/file-upload-perspective/25797>\
**Category:** Ignition\
**Created:** [June 13, 2019, 2:07pm UTC](https://forum.inductiveautomation.com/t/file-upload-perspective/25797 "2019-06-13T14:07:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 13, 2019, 3:02pm UTC](https://forum.inductiveautomation.com/t/file-upload-perspective/25797/2 "2019-06-13T15:02:08Z")

</div>

```auto
upload_path = 'webserver/webapps/main/'
system.util.getLogger('FILEUPLOAD').info('Uploading: \'{0}\' to directory \'{1}\''.format(event.file.name, upload_path))
event.file.copyTo(upload_path + event.file.name)

```

will place a file directly into the `Inductive Automation\ignition\webserver\webapps\main` directory of your Gateway.

Assuming you upload a file to that destination, you can then locate that file (in the same script) with

```auto
system.file.fileExists(upload_path + event.file.name)

```

If you were to upload an image with a file name of “filename.jpeg”, for example, then you would then point to that file in an Image component with `/filename.jpeg`.

---

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