I am working on asp.net (mvc) project
I have to use method which provides possibility to download files by its url and download it into project map ~/App_Data/uploads/Docs
to this path, and I cant find method to specify where the file will be saved.
The method which I found to download by URL:
using (var client = new WebClient())
{
string pathAndName = Path.Combine(System.Web.HttpContext.Current.Server.MapPath("~/App_Data/uploads/Docs"), "stack.png");
client.DownloadFile("https://www.gravatar.com/avatar/51d065150eba7bfe5b6379e4caaaae88?s=328&d=identicon&r=PG", pathAndName);
}
How could I fix that issue?