เช็คเมลก่อนส่งเมลสมัครสอบ
This commit is contained in:
parent
6a2fda2a62
commit
a207e5077c
5 changed files with 296 additions and 276 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue