This commit is contained in:
parent
9c2caa3f4a
commit
2b000cbd69
5 changed files with 95 additions and 63 deletions
|
|
@ -717,9 +717,11 @@ namespace BMA.EHR.Recruit.Controllers
|
|||
var doc = await _minioService.UploadFileAsync(file);
|
||||
var import_doc_id = doc.Id.ToString("D");
|
||||
|
||||
var fileContent = (await _minioService.DownloadFileAsync(doc.Id)).FileContent;
|
||||
System.IO.File.WriteAllBytes(importFile, fileContent);
|
||||
fileContent = null;
|
||||
// Write file to disk directly from IFormFile instead of downloading back from MinIO
|
||||
using (var stream = new FileStream(importFile, FileMode.Create))
|
||||
{
|
||||
await file.CopyToAsync(stream);
|
||||
}
|
||||
|
||||
// สร้างรอบการบรรจุ
|
||||
var imported = new RecruitImport
|
||||
|
|
@ -931,9 +933,11 @@ namespace BMA.EHR.Recruit.Controllers
|
|||
var doc = await _minioService.UploadFileAsync(file);
|
||||
var import_doc_id = doc.Id.ToString("D");
|
||||
|
||||
var fileContent = (await _minioService.DownloadFileAsync(doc.Id)).FileContent;
|
||||
System.IO.File.WriteAllBytes(importFile, fileContent);
|
||||
fileContent = null;
|
||||
// Write file to disk directly from IFormFile instead of downloading back from MinIO
|
||||
using (var stream = new FileStream(importFile, FileMode.Create))
|
||||
{
|
||||
await file.CopyToAsync(stream);
|
||||
}
|
||||
|
||||
// Enqueue background job
|
||||
var job = _importJobTracker.CreateJob(new ImportJobInfo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue