Imran
Imran

Reputation: 53

Download Image file from one URL to another server

I have to download images from live URL and save to live Server.

Upvotes: 0

Views: 2420

Answers (1)

Antonio Bakula
Antonio Bakula

Reputation: 20693

You can use WebClient and download and store image, very simple :

WebClient wc = new WebClient;
wc.DownloadFile("http://www.site.com/image.jpg", 
                 Server.MapPath("~\images\image.jpg"));

of course you got to set Images directory writeable from your web app

Upvotes: 2

Related Questions