เช็คเมลก่อนส่งเมลสมัครสอบ

This commit is contained in:
Kittapath 2023-05-30 10:08:01 +07:00
parent 6a2fda2a62
commit a207e5077c
5 changed files with 296 additions and 276 deletions

View file

@ -224,6 +224,29 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
return path;
}
public async Task<string> ImagesPathString(string fileId)
{
if (fileId == null)
return "";
var config = new AmazonS3Config
{
ServiceURL = Configuration.GetValue<string>("MinIO:Endpoint"),
ForcePathStyle = true
};
DateTime expires = DateTime.UtcNow.AddHours(6);
GetPreSignedUrlRequest request = new GetPreSignedUrlRequest
{
BucketName = _bucketName,
Key = fileId,
Expires = expires,
};
string path = _s3Client.GetPreSignedURL(request);
return path;
}
#endregion
}
}