C# MVC 火狐下载文件时,弹窗中的文件名为乱码
C# MVC 火狐下载文件时,弹窗中的文件名为乱码,但是IE不乱码。
代码如下:
public ActionResult DownloadFile(Guid id) { try { Document document = DocumentDao.GetDocumentById(id); string path = string.Format("{0}/{1}", Server.MapPath("/Documents"), document.ArchiveIdentity); return File(path, "application/octet-stream", Url.Content(document.FileName)); } catch { return null; } }