I'm facing an issue in my current Web API project. I have a database and one of the tables has a column of type varbinary. I would like to build an action method where I retrieve the data from that column and prepare it so when I call this action method, I can view the actual video from Android and iOS devices.
I managed to get it work on Android but not iOS, and my attempt for the Android is like the following:
[HttpGet]
public IActionResult Get() {
var bytes = //getting the data form the database;
var stream = new MemoryStream(bytes);
return File(stream, "video/mp4");
}
I found answers and blog posts where they used PushStreamContent class and I think this class is not available in asp.net core.