StevieB
StevieB

Reputation: 6523

ASP.NET HTTP Get a .tif file and save down

Hey I am currently using a component in which I need to load a path to a file.

Now my plan was originally to just use the URL to the file since they are hosted on the web, but sadly this component can only load file saved down locally.

So now I am thinking before I can load the file in this component I need to save down the file first,

So how would I go about this in .net

1) Call URL 2) Save down the file to a local folder

Upvotes: 2

Views: 479

Answers (1)

Josh M.
Josh M.

Reputation: 27773

Download it with the WebClient class:

using (WebClient client = new WebClient())
{
    client.DownloadFile("http://the.address.com/TheImage.tiff", @"C:\TheImage.tiff");
}

Upvotes: 2

Related Questions