This commit is contained in:
MaxchilKH 2020-11-11 17:03:35 +01:00
parent 2176fbe661
commit 7fc9eef637

View File

@ -101,13 +101,12 @@ namespace InternshipSystem.Api.Controllers
var document = internship.Documentation.First(d => d.Id == documentId); var document = internship.Documentation.First(d => d.Id == documentId);
document.Scan = new DocumentScan document.Scan ??= new DocumentScan();
{
File = memoryStream.ToArray(), document.Scan.Size = memoryStream.Length;
Size = memoryStream.Length, document.Scan.Filename = documentScan.FileName;
Filename = documentScan.FileName, document.Scan.Mime = _fileValidator.GetFileMime(memoryStream.ToArray());
Mime = _fileValidator.GetFileMime(memoryStream.ToArray()) document.Scan.File = memoryStream.ToArray();
};
document.State = DocumentState.Submitted; document.State = DocumentState.Submitted;