Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to download existing file on server with blazor wasm

$
0
0

Suppos I have a existing file ("export.xls") on "wwwroot/files" folder and I want to download it,I tried to use MemoryStream like:

 await ms.WriteAsync(resFile.Content); var res = new FileStreamResult(ms, "text/csv;charset=utf-8") { FileDownloadName = "export.xls" }; return res;

but it doesn't work.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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