public async Task <IActionResult> GetAllDownloadFileByFileName(string FileName) { ModelMenuB1_FileDownload e = await _IDocMenuBService.GetAllDownloadFileByFileNameAsync(FileName); if (e != null) { return(Ok(e)); } else { return(BadRequest()); } }
public async Task <ModelMenuB1_FileDownload> GetAllDownloadFileByFileNameAsync(string filename) { ModelMenuB1_FileDownload resp = new ModelMenuB1_FileDownload(); if (!string.IsNullOrEmpty(filename)) { resp.filename = filename; resp.filebase64 = ServerDirectorys.ReadFileToBase64(_IEnvironmentConfig.PathDocument, FolderDocument.menuA1, filename); return(resp); } else { return(null); } }