LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Download Files from http?

Solved!
Go to solution
How to Download Files from http
0 Kudos
Message 1 of 7
(3,061 Views)

If you have a URL for a file you want to download, you can use the HTTP Client VIs to GET that resource.

Alternatives could include using "wget" or "curl" or similar from a command line using the System Exec node (but these are more brittle, and so should be a second choice).


GCentral
0 Kudos
Message 2 of 7
(3,040 Views)

how about use ''simple get'' from ''webDAV''?Thanks

0 Kudos
Message 3 of 7
(3,026 Views)
Solution
Accepted by topic author hyzgbt

@hyzgbt wrote:

how about use ''simple get'' from ''webDAV''?Thanks


Yes, you could use those too. I found the palette you meant now. However, when I tried to replace the example below with the webDAV code, I was told that redirection was refused. So as in the case below, be careful for URLs that redirect you somewhere else...

 

Here's an example using the client VIs. I picked the target by random repository on GitHub, then going to releases.

DownloadFile_BD.png

Interestingly, the file that comes out (output_file.html) just tells you you're being redirected to some other page to download it, so you don't really download the zip with this code...

Hopefully you have a real URL that you can GET.


GCentral
0 Kudos
Message 4 of 7
(3,013 Views)

Thank you very much!I will try it later

0 Kudos
Message 5 of 7
(2,997 Views)

As picture,It have error when I used those,can you help me solve it?.After my customer send the url to me,I try it again.Thanks your help.
Best Regards1.JPG

2.JPG

 

0 Kudos
Message 6 of 7
(2,952 Views)

You have wired "D:\" as your path to a file. I suspect the error supports this conclusion, but I confess I can't accurately read it.

 

You need to give a filename, not a directory.


GCentral
0 Kudos
Message 7 of 7
(2,922 Views)