コード例 #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"));
        }
コード例 #2
0
ファイル: ProfileController.cs プロジェクト: Ferido07/inisra
        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"));
        }