public async Task <FileContentResult> DownloadCV(int id, int jobSeekerId) { var cvs = await bll.GetCVs(jobSeekerId); CV cv = cvs.Find(c => c.ID == id); Response.AppendHeader("content-disposition", "attachment;filename=" + cv.DocumentName); return(new FileContentResult(cv.Document, "text/plain")); }
public async Task <FileContentResult> DownloadCV(int id) { var jobSeekerUser = (JobSeekerUser)(await UserManager.FindByIdAsync(User.Identity.GetUserId())); var cvs = await bll.GetCVs(jobSeekerUser.JobSeekerID.Value); CV cv = cvs.Find(c => c.ID == id); Response.AppendHeader("content-disposition", "attachment;filename=" + cv.DocumentName); return(new FileContentResult(cv.Document, "text/plain")); }