# Perspective Scripting system.file

**URL:** <https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137>\
**Category:** Ignition Early Access\
**Created:** [January 26, 2019, 4:26am UTC](https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137 "2019-01-26T04:26:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rberghammer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rberghammer/32/7150_2.png) [@rberghammer](https://forum.inductiveautomation.com/u/rberghammer)\
**Post date:** [January 26, 2019, 4:26am UTC](https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137/1 "2019-01-26T04:26:24Z")

</div>

The online manual shows some of the system.file functions are available in Perspective Session scope. I am having trouble getting them to work in a button click event. Are these not available in a browser session?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 26, 2019, 1:18pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137/2 "2019-01-26T13:18:57Z")

</div>

Which function are you trying to use?

---

<div class="post-metadata">

**Author:** ![rberghammer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rberghammer/32/7150_2.png) [@rberghammer](https://forum.inductiveautomation.com/u/rberghammer)\
**Post date:** [January 26, 2019, 2:34pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137/3 "2019-01-26T14:34:46Z")

</div>

I have tried a few of them with no luck. But for an example, the system.file.openFile() function.

When I try to put this example code in a button click event:  
`path` `=``system.` `file` `.openFile(` `'gif'` `)`

Nothing happens. When I put this in a vision window button, I get an open file dialog.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 26, 2019, 2:37pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137/4 "2019-01-26T14:37:10Z")

</div>

Yeah, that one isn’t going to work. Nothing that would cause a UI or popup to appear will work.

We need to remove those from the autocomplete list if they are showing up as available.

---

<div class="post-metadata">

**Author:** ![rberghammer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rberghammer/32/7150_2.png) [@rberghammer](https://forum.inductiveautomation.com/u/rberghammer)\
**Post date:** [January 26, 2019, 2:39pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137/5 "2019-01-26T14:39:28Z")

</div>

Ok, thanks for the reply. Is there any alternative I can use? I’m trying to allow users to upload xml files to a database.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 26, 2019, 2:42pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137/6 "2019-01-26T14:42:15Z")

</div>

I’m not familiar enough with all the Perspective stuff to answer that, someone else will have to come along and chime in. I’m sure they’ve considered this, just not sure whether a solution exists yet or not.

---

<div class="post-metadata">

**Author:** ![rberghammer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rberghammer/32/7150_2.png) [@rberghammer](https://forum.inductiveautomation.com/u/rberghammer)\
**Post date:** [January 26, 2019, 2:52pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137/7 "2019-01-26T14:52:16Z")

</div>

No problem. Also, I just checked the auto-complete list and those functions are not in the list. I was referring to the online manual under syntax where is says “Scope: Gateway, Vision Client, Perspective Session”.

---

<div class="post-metadata">

**Author:** ![Kevin.McClusky](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@Kevin.McClusky](https://forum.inductiveautomation.com/u/Kevin.McClusky)\
**Post date:** [January 28, 2019, 6:36am UTC](https://forum.inductiveautomation.com/t/perspective-scripting-system-file/22137/8 "2019-01-28T06:36:07Z")

</div>

As of right now, there’s no way to upload through Perspective. I know some of the developers on the Perspective team are considering adding the functionality. (As for downloading files, you can currently pair Perspective with Web Dev and serve files through a Web Dev endpoint.)
