上打開另一個瀏覽器實例的頁面我有一個鏈接如何通過單擊鏈接
<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