Merge branch 'develop' of github.com:Frappet/BMA-EHR-BackEnd into develop

This commit is contained in:
kittapath 2024-12-13 11:53:09 +07:00
commit b532eefa61
4 changed files with 12 additions and 5 deletions

View file

@ -610,7 +610,9 @@ namespace BMA.EHR.Leave.Service.Controllers
if (data.CheckInFileName == "no-file") throw new Exception(GlobalMessages.NoFileToUpload);
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]))
{
await _minIOService.UploadFileAsync(fileName, ms);