【发布时间】:2009-10-29 13:28:41
【问题描述】:
我的站点中有一个 mp3 文件。我想将其输出为视图。 在我的控制器中,我有:
public ActionResult Stream()
{
string file = 'test.mp3';
this.Response.AddHeader("Content-Disposition", "test.mp3");
this.Response.ContentType = "audio/mpeg";
return View();
}
但是我该如何返回 mp3 文件呢?
【问题讨论】:
标签: asp.net-mvc view