Update CandidateController.cs

This commit is contained in:
AnandaTon 2023-04-03 11:21:26 +07:00
parent 91c76422a8
commit ee7a661d38

View file

@ -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)
{