i have a link
<a id="DownloadLink" href='controller/action' target="_blank">Download File</a>
that has to open a image in another tab or page. but it offers me to download the file.
my action looks like this
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);
}
where the content type is an image/jpeg
whats wrong?