There are files from 500 MB in size, along the path /mnt/test, how can I generate a link to download a file without putting this file in the site directory by type: www/name/files/.
I tried to use a file stream, but js does not have enough memory to accommodate such a size.
Tried to use the library as well https://github.com/arivera12/BlazorDownloadFile , but the problem is the same. From the library used the method
/// <summary>
/// Download a file from blazor context to the browser.
/// </summary>
/// <param name="fileName">The filename</param>
/// <param name="stream">The stream of the file</param>
/// <param name="cancellationTokenBytesRead">The cancellation token when reading bytes</param>
/// <param name="timeOutJavaScriptInterop">The timeout when executing javascript</param>
/// <param name="contentType">The file content type</param>
/// <returns></returns>
ValueTask<DownloadFileResult> DownloadFile(string fileName, Stream stream, CancellationToken cancellationTokenBytesRead, CancellationToken cancellationTokenJavaScriptInterop, string contentType = "application/octet-stream");
I found an approach through the generation of a link to a file, this approach is used by cloud storage. But I don't know how to implement, has anyone already encountered this?
Error message:
Stream was too long