Beispiel #1
0
        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("فایل قابل دانلود نیست ");
            }
        }
Beispiel #2
0
 public IActionResult ShowCreateContentCover(Domain.File file, short fileId)
 {
     return(ViewComponent("ShowContentCoverImage", new { file = file.Id != 0 ? file : null, fileId = fileId }));
 }
Beispiel #3
0
 public IActionResult ReturnLogoImage(Domain.File file, short fileId, string typeId)
 {
     return(ViewComponent("SelectLogo", new { file = file.Id != 0 ? file : null, fileId = fileId, typeId = typeId }));
 }