I have an mp3 file in my site. I want to output it as a view. In my controller I have:
public ActionResult Stream() { string file = \'test.mp3\';
Create an Action like this:
public ActionResult Stream(string mp3){ byte[] file=readFile(mp3); return File(file,"audio/mpeg"); }
The function readFile should read the MP3 from the file and return it as a byte[].