SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

Download file from Systemlink server using LabVIEW APIs

Solved!
Go to solution

1. I created a Systemlink server (localhost:9091)
I upload a file named a.csv to File Viewer on Systemlink Web Application.
I would like to download it from client using LabVIEW but I cannot find any examples about it.
I try this method as the snippet below.
I got this error 

 

Spoiler
LabVIEW: (Hex 0x58BEC) Failed to connect to the specified hostname. Be sure the specified hostname is correct, the server is running and configured to accept remote requests.

Please show me how to do that.

2. If I would like to sync the files on the Systemlink server to the client, are there any solutions for that?

 

Thank you in advance

 

0 Kudos
Message 1 of 5
(2,658 Views)
Solution
Accepted by topic author anhduy92

I think you need to specify the protocol and port when you initialize the session.  Try setting the server to "http://localhost:9091" assuming you are using http and not https.

0 Kudos
Message 2 of 5
(2,625 Views)

I followed you and it worked when I changed the server to http. How about https?
Btw, when I upload file to server, how can I replace the old ones with the same name, properties?

0 Kudos
Message 3 of 5
(2,608 Views)

To use https you would need to re-run the NI Web Server Configuration utility on the server to create a self-signed certificate or install one an officially signed one.

 

SystemLink doesn't support "overwriting" or "editing" files published to the server.  They are intended to be idempotent, and you can publish multiple files with the same name and SystemLink will store each one separately without any collisions.  

 

If you need to "replace" a file you will need to upload the new file and then delete the original.

0 Kudos
Message 4 of 5
(2,580 Views)

Thank you for your quick response.

I will try with HTTPs later. I hope I can go through on it. If not, maybe, I will take your time again.

Thank you again 😛

0 Kudos
Message 5 of 5
(2,564 Views)