diff --git a/Controllers/CandidateController.cs b/Controllers/CandidateController.cs index 6b50211..4f6c51b 100644 --- a/Controllers/CandidateController.cs +++ b/Controllers/CandidateController.cs @@ -795,7 +795,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers { var doc = await _candidateService.GetsAsyncProfileImage(examId); - return Success(doc); + var file_data = await _minioService.DownloadFileAsync(doc); + Response.Headers["Content-Disposition"] = $"inline; filename={file_data.FileName}"; + var ret = new FileContentResult(file_data.FileContent, file_data.FileType) + { + FileDownloadName = file_data.FileName + }; + + return ret; } catch (Exception ex) { @@ -821,7 +828,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers { var doc = await _candidateService.GetsAsyncPaymentImg(examId); - return Success(doc); + var file_data = await _minioService.DownloadFileAsync(doc); + Response.Headers["Content-Disposition"] = $"inline; filename={file_data.FileName}"; + var ret = new FileContentResult(file_data.FileContent, file_data.FileType) + { + FileDownloadName = file_data.FileName + }; + + return ret; } catch (Exception ex) {