0
I need to upload and downlods files above 2GB using ASP.NET Core 2.2, but I don’t know the best way to do this. For the download, to using the following method:
[HttpGet("id")]
public IActionResult Download(Guid id)
{
// Recupero o caminho físico do arquivo com base no id aqui
return PhysicalFile(path, MimeTypes.GetMimeType(path), Path.GetFileName(path));
}
Apparently it works normal, but I have doubts about performance or parallel requests. There is a better approach to doing this?
Already in the upload I thought of separating the file into pieces on the client side and sending these pieces in various requests. On the server side I would receive each piece, save at the end of the file and send a reply so that a new piece is sent. But... Is this really a good way to do it? I think I might have competition issues opening/closing the file at the written time.
What is the appropriate way to download/upload?
I ended up choosing to use the Azure storage service, but thanks for sharing your reply.
– MGM