question

DickyLau-6942 avatar image
0 Votes"
DickyLau-6942 asked DickyLau-6942 commented

How to download large file (>300mb) via .net core 3.1 API?

Dear Sir/madam,

I would like to create a API endpoint for downloading large file (>300mb). How can I download a large file (>300mb) using .net core 3.1 c#?

Thanks & Regards,
Dicky

dotnet-standard
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
0 Votes"
Castorix31 answered DickyLau-6942 commented

This test with a 512 MB file works for me in .Net Core 3.1 =>

At begining :

 using System.Net;

Then :

         using (WebClient wc = new WebClient())
         {
             wc.Headers.Add("User-Agent: Test");
             wc.DownloadFile("http://ipv4.download.thinkbroadband.com/512MB.zip", "e:\\512MB.zip");
         } 
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks @Castorix31 and it is now working.

0 Votes 0 ·