public async Task <ActionResult> AddAttachment(int id, string description) { var file = Request.Files[0]; var fileInfo = await _fileManagerAppService.SaveFile(new SaveFileInput(file)); await _postAppService.AddAttachment(new PostAttachmentInput() { FileUrl = fileInfo.Url, Id = id, StoredInCdn = fileInfo.StoredInCloud, Description = description, FileName = file?.FileName }); return(RedirectToAction("AddAttachment", new { id })); }