79245630

Date: 2024-12-02 21:29:21
Score: 1.5
Natty:
Report link

Set optional enableRangeProcessing to true, you don't have to handle range header yourself.

public virtual FileStreamResult File(Stream fileStream, string contentType, bool enableRangeProcessing)

https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.fileresult.enablerangeprocessing?view=aspnetcore-9.0

Further reading source code https://github.com/dotnet/aspnetcore/blob/main/src/Shared/ResultsHelpers/FileResultHelper.cs#L90

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Bonelol