Just spitballing, but something like this should be possible.
private HttpClient httpClient;
public async Task DownloadImageAndSaveAsync(string sourceFile, string outputFolder, string outputFileName)
{
try
{
using Stream fileStream = await httpClient.GetStreamAsync(fileUrl);
Directory.CreateDirectory(outputFolder);
string path = Path.Combine(outputFolder, outputFileName);
using FileStream outputFileStream = new FileStream(path, FileMode.CreateNew);
await fileStream.CopyToAsync(outputFileStream);
}
catch (Exception ex)
{
}
}