Hi I would like to send user a file but without showing the url.
Using File method the problem is that I have my file in another server and so I have only url not a virtual path, I tried to use WebClient to get file bytes to use in File method but it's quite slow, my files are greater than 20 Mb!
Any idea on how can I do this without get all file bytes before sending them to my user?
This is my code inside my Controller:
using (WebClient Client = new WebClient())
{
byte[] fileContent = Client.DownloadData(fileUrl);
return File(fileContent, "application/octet-stream", fileName);
}
Thanks