日期:2014-05-17 浏览次数:20991 次
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; } }