Exemple #1
0
        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"));
        }
Exemple #2
0
        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"));
        }