上打开另一个浏览器实例的页面我有一个链接如何通过单击链接
<a id="DownloadLink" href='controller/action' target="_blank">Download File</a>
已在另一个标签或页面打开一个图像。但它提供给我下载文件。
我的行动看起来像这样
public FileContentResult GetSurveyFile(int Id)
{
if (Id == 0)
return null;
Survey survey = Repository.GetItem(Id);
if (survey.File == null)
return null;
return File(survey.File.FileContent.ToArray(), survey.File.ContentType,survey.File.Name);
}
其中内容类型是图像/ JPEG
什么错?
您的浏览器配置如何处理“图像/ JPEG” MIME类型? – korona 2010-03-22 15:38:38
这里的问题是'Content-Disposition'头文件。 – SLaks 2010-03-22 15:40:14
我该如何更改内容配置? – CoffeeCode 2010-03-22 16:11:52