This commit is contained in:
2020-01-28 00:55:31 +00:00
parent 6e2c00acc2
commit 6a682a6475
5 changed files with 15 additions and 22 deletions

View File

@@ -222,7 +222,7 @@ namespace AyaNova.Api.Controllers
{
foreach (UploadedFileInfo a in uploadFormData.UploadedFiles)
{
var v = FileUtil.storeFileAttachment(a.InitialUploadedPathName, a.MimeType, a.OriginalFileName, attachToObject, ct);
var v = await FileUtil.StoreFileAttachmentAsync(a.InitialUploadedPathName, a.MimeType, a.OriginalFileName, attachToObject, ct);
returnList.Add(new NameIdItem()
{
Name = v.DisplayFileName,
@@ -300,7 +300,7 @@ namespace AyaNova.Api.Controllers
//do the delete
//this handles removing the file if there are no refs left and also the db record for the attachment
FileUtil.deleteFileAttachment(dbObj, ct);
await FileUtil.DeleteFileAttachmentAsync(dbObj, ct);
//Event log process delete
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObj.AttachToObjectId, dbObj.AttachToObjectType, AyaEvent.AttachmentDelete, dbObj.DisplayFileName), ct);