private async Task <Domain.File> GetFileAsync(IFormFile file, string title, string description) { var result = await _fileService.Upload(file); var logoFile = new Domain.File(); if (result != null) { return(await _fileService.Create(new Domain.File { Name = result, Title = title, Description = description })); } else { throw new Exception("فایل قابل دانلود نیست "); } }
public IActionResult ShowCreateContentCover(Domain.File file, short fileId) { return(ViewComponent("ShowContentCoverImage", new { file = file.Id != 0 ? file : null, fileId = fileId })); }
public IActionResult ReturnLogoImage(Domain.File file, short fileId, string typeId) { return(ViewComponent("SelectLogo", new { file = file.Id != 0 ? file : null, fileId = fileId, typeId = typeId })); }