# File path access from file upload component

**URL:** <https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 3, 2024, 10:59am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733 "2024-01-03T10:59:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamilvanan\_S](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@Tamilvanan\_S](https://forum.inductiveautomation.com/u/Tamilvanan_S)\
**Post date:** [January 3, 2024, 10:59am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/1 "2024-01-03T10:59:04Z")

</div>

I am New for ignition. I need to create Tree view in perspective using the array script

---

<div class="post-metadata">

**Author:** ![Tamilvanan\_S](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@Tamilvanan\_S](https://forum.inductiveautomation.com/u/Tamilvanan_S)\
**Post date:** [January 3, 2024, 11:39am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/2 "2024-01-03T11:39:21Z")

</div>

Pls Help Me

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 3, 2024, 12:08pm UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/3 "2024-01-03T12:08:33Z")

</div>

Please be patient. You have asked on a forum where most of us are volunteers. You will get answers if you ask a good and interesting question when people have time to answer.

"Pls Help Me" did not improve your question. Instead, post details of your data source and a sample of how you want the tree to look.

---

<div class="post-metadata">

**Author:** ![Tamilvanan\_S](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@Tamilvanan\_S](https://forum.inductiveautomation.com/u/Tamilvanan_S)\
**Post date:** [January 29, 2024, 10:05am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/4 "2024-01-29T10:05:15Z")

</div>

Sure

---

<div class="post-metadata">

**Author:** ![Tamilvanan\_S](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@Tamilvanan\_S](https://forum.inductiveautomation.com/u/Tamilvanan_S)\
**Post date:** [January 29, 2024, 10:07am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/5 "2024-01-29T10:07:45Z")

</div>

Hi, How to find file path from file upload component ...

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [January 29, 2024, 10:15am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/6 "2024-01-29T10:15:00Z")

</div>

[https://docs.inductiveautomation.com/display/DOC81/Perspective+-+File+Upload+Scripting](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+File+Upload+Scripting)

you mean the filepath to where you can upload your file to with event.file.copyTo(filePath) ?

```auto
Description
Saves the uploaded file at a location accessible to the Gateway.
Parameters
String filePath - The path to where the file should be saved on the Gateway.

```

it can be any path **accessible to the Gateway**

---

<div class="post-metadata">

**Author:** ![Tamilvanan\_S](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@Tamilvanan\_S](https://forum.inductiveautomation.com/u/Tamilvanan_S)\
**Post date:** [January 29, 2024, 10:24am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/7 "2024-01-29T10:24:09Z")

</div>

Hi I need file path for where the file should be saved on the gateway.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [January 29, 2024, 10:34am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/8 "2024-01-29T10:34:47Z")

</div>

The upload component upload a file chosen by the client,  
In the script you can choose to store this on the gateway using the copyTo, to where ever you want aslong its **accessible to the Gateway**

you have to decide where

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [January 29, 2024, 10:36am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/9 "2024-01-29T10:36:16Z")

</div>

What do you want to do with the file once it is saved?

---

<div class="post-metadata">

**Author:** ![Tamilvanan\_S](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@Tamilvanan\_S](https://forum.inductiveautomation.com/u/Tamilvanan_S)\
**Post date:** [January 29, 2024, 10:39am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/10 "2024-01-29T10:39:49Z")

</div>

I want to read the data from excel and I have to create a tags..how to find accessible to the gateway folders?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [January 29, 2024, 10:48am UTC](https://forum.inductiveautomation.com/t/file-path-access-from-file-upload-component/83733/11 "2024-01-29T10:48:22Z")

</div>

So you actually just want to let the user import some data (from excel) and put this data into a tag?  
For this case you probably want to check this,  
[https://docs.inductiveautomation.com/display/DOC81/system.dataset.fromCSV](https://docs.inductiveautomation.com/display/DOC81/system.dataset.fromCSV)  
or

> [@Copying an Excel file to a table's dataset](https://forum.inductiveautomation.com/t/copying-a-excel-file-to-a-tables-dataset/34942/13):
>
> Got my paperwork done early, so here's a sample to read from an Excel file EDIT: Reworked a bit to work with both .xls and .xlsx files EDIT: Modified to properly cast data types EDIT: Added handler for formula cell types EDIT: Added parameters to optionally specify sheet, row, and column numbers Reading back a file created from my other example: def excelToDataSet(fileName, hasHeaders = False, sheetNum = 0, firstRow = None, lastRow = None, firstCol = None, lastCol = None): import org.apac…

The gateway acces depends on the user rights it runs on,  
Shared folders require some extra configuration to have access [https://docs.inductiveautomation.com/display/DOC81/Mapping+a+Network+Drive](https://docs.inductiveautomation.com/display/DOC81/Mapping+a+Network+Drive)
