Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Download files from other sites and streaming file

$
0
0

Hello.

I have a site for download rar files, download links are from other sites:

My site is : MySite.Com

Download link: OtherSite.Com/File.rar

I don't want to see user original download link and stream file and download it from MySite.Com.

I have found a solution :

private static HttpClient Client { get; } = new HttpClient();
[HttpGet]
public async Task<FileStreamResult> Get()
{
            var stream = await Client.GetStreamAsync("http://dl.emdadgraphic.ir/upnew/Font-farsi/fontsfull.rar");

            return new FileStreamResult(stream, new MediaTypeHeaderValue("application/x-rar-compressed"))
            {
                FileDownloadName = "file.rar"
            };
}

But the problem is i dont have pause & resume ability in Internet Download Manager.

Can anyone help me?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>