How to create a button to open file explorer to choose file

Hello can someone tell me how to create a button to choose file?
I found this forum

In that forum, it said to use system.net.openURL and said Make sure your gateway has access to the share (in ignition.conf).
I don't know where is ignition.conf.
If anyone who know the process to make, please help me.
Thank you for your time.

What do you want to do with that file ?

I'm trying to import excel files which are going to use for dataset tags.
So the users can choose the excel file they want to import into the tags.
In tag editor, I'm using runScript. For example runScript(filepath).
Currently I'm just using the filepath address like C:\Users\exelfile in runScript.
So I want the file path to be able to choose.
That is the whole process I want to do.

So for the first step, I'm trying to make a button to open the file explorer.

Use the upload component. This will handle the file selection for you.
Then use the component's onFileReceived event to process the file and assign the results to a memory tag.

1 Like

I will try to do like you said.
Thank you for your help Sir.

Thank you so much for your advice Sir.
I did it !

If you did need to access fileshares from the gateway however, you would likley need to change the user that the Ignition service runs under to a user that has access to your fileshare location. In Windows, you do this from Windows Services -> edit the "Ignition" service, and set the Log On user.
image

2 Likes

Thank you Sir !