Reputation: 31
I have created the API in asp.net core 2.0 that returns the video file streaming Result. Below is the code sample for returning the filestream result. The URL is working fine on Chrome but the URL will not work on iOS device and Safari browser.
How to implement the range request / response in asp.net core 2.0?
var fileStream = await this.amazonS3Service.Open(
request.FileName,
path,
cancellationToken);
return new FileStreamResult(fileStream, this.GetContentType(request.FileName));
Upvotes: 2
Views: 1720
Reputation: 191
What iOS considered to be is stream range and content-length header
In dotnet Core 2.1 was added support for Ranges
Use File constructor with enableRangeProcessing
return File(fileStream, this.GetContentType(request.FileName), true);
Upvotes: 2