fix upload check picture to minio
Some checks failed
release-dev / release-dev (push) Failing after 12s
Some checks failed
release-dev / release-dev (push) Failing after 12s
This commit is contained in:
parent
cc71cfbc38
commit
e15568b561
1 changed files with 3 additions and 1 deletions
|
|
@ -610,7 +610,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
if (data.CheckInFileName == "no-file") throw new Exception(GlobalMessages.NoFileToUpload);
|
if (data.CheckInFileName == "no-file") throw new Exception(GlobalMessages.NoFileToUpload);
|
||||||
var currentDate = data.CurrentDate ?? DateTime.Now;
|
var currentDate = data.CurrentDate ?? DateTime.Now;
|
||||||
|
|
||||||
var fileName = $"{_bucketName}/{userId}/{currentDate.ToString("dd-MM-yyyy")}/{data.CheckInFileName}";
|
var check_status = data.CheckInId == null ? "check-in-picture" : "check-out-picture";
|
||||||
|
|
||||||
|
var fileName = $"{_bucketName}/{userId}/{currentDate.ToString("dd-MM-yyyy")}/{check_status}/{data.CheckInFileName}";
|
||||||
using (var ms = new MemoryStream(data.CheckInFileBytes ?? new byte[0]))
|
using (var ms = new MemoryStream(data.CheckInFileBytes ?? new byte[0]))
|
||||||
{
|
{
|
||||||
await _minIOService.UploadFileAsync(fileName, ms);
|
await _minIOService.UploadFileAsync(fileName, ms);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue