What action result should I use when I try to return mp4 video using asp.net mvc csharp?
Currently, I hide my videos behind the method in order to protect it from unauthorized access. I call these clips from JWPlayer in a web browser. However, the title information does not appear to be available or the video is prepared for download and not for playback. Something strange, one way or another.
How do I return a file? Should I include additional headers?
This is what I am doing now:
return File(path, file.MimeType, fileName);
source share