Dropbox: Download Image from a Public URL

34 Views Asked by At

I am trying to downlead a file form a shared Dropbox location. I have been given a URL form a client and URL is public. for example

https://www.dropbox.com/scl/fi/cr9zwyye5bz573ix4sjos/801NMSV621R-M570_1.jpg?rlkey=cupnu908llx3h2vzmmec97z9z&dl=0

I was excepting a normal httpclient would be able to do the job but it is not working.

public static async Task DownloadFile(string url, string saveAs)
{
     using (var client = GetHttpClient())
     {
          await client.DownloadFileTaskAsync(url, saveAs);
     }
}

I can download the image but when I open it, I see following message.

enter image description here

I have URL of hundreds of images and I can't download them manually form the browser.

0

There are 0 best solutions below