|
|
|
@ -8,14 +8,15 @@ namespace AOLBackend.Services.MFileManager |
|
|
|
|
{ |
|
|
|
|
private readonly IFileManagerRepository _Repo; |
|
|
|
|
private readonly IConfiguration _config; |
|
|
|
|
// private readonly IFilePaths4ProcessRepository _RepoRelativePath; |
|
|
|
|
private readonly string rootPath; |
|
|
|
|
private readonly string defaultImage; |
|
|
|
|
|
|
|
|
|
public SvcMFileManager(IConfiguration config, IFileManagerRepository Repo, string _rootPath) |
|
|
|
|
{ |
|
|
|
|
_config = config; |
|
|
|
|
_Repo = Repo; |
|
|
|
|
rootPath = _rootPath; |
|
|
|
|
defaultImage = _config.GetValue<string>("defaultImage"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public async Task<List<FileManager>> GetFilesFromLog(int Tags, int Proceso) |
|
|
|
@ -26,8 +27,7 @@ namespace AOLBackend.Services.MFileManager |
|
|
|
|
public async Task<IActionResult> getFileContentById(long id) |
|
|
|
|
{ |
|
|
|
|
Boolean ExisteEnDisco = false; |
|
|
|
|
byte[] emptyFile = System.IO.File.ReadAllBytes("c:\\downs\\empty.png"); |
|
|
|
|
//byte[] emptyFile = System.IO.File.ReadAllBytes("D:\\data\\empty.png"); |
|
|
|
|
byte[] emptyFile = System.IO.File.ReadAllBytes(defaultImage); |
|
|
|
|
MemoryStream emptyms = new MemoryStream(emptyFile); |
|
|
|
|
FileManager recFound = await _Repo.getFileById(id); |
|
|
|
|
if (!String.IsNullOrEmpty(recFound.NombreArchivo)) |
|
|
|
|