问题
My scenario:
- ASP.NET Core 2.1
- Web API Controller
- Azure Blob Storage as storage
I read some docs on internet (and on Stack Overflow in particular), but I didn't find a real complete answer to my question.
Question
Which is the best practice to upload and download BIG files using a ASP.NET Core 2.1 Web Api Controller and Azure Blob Storage as back-end for saving data?
Please, suppose the controller is:
[Route("api/[controller]")]
[ApiController]
public class UploadDownloadController : Controller
{
[HttpGet("upload")]
public void Download()
{
...
}
[HttpPost]
public Result Upload([FromBody] string someData)
{
...
}
}
Where Result
is a class to return some data on the operation.
Please note that:
- For BIG files, it's better not to use
IFormFile
interface - Files can be very big: tens or hundreds giga
Thank you,
Attilio
来源:https://stackoverflow.com/questions/51426999/asp-net-core-web-api-upload-and-download-file