diff --git a/Services/MFileManager/SvcMFileManager.cs b/Services/MFileManager/SvcMFileManager.cs index dd64a6b..e25dbaa 100644 --- a/Services/MFileManager/SvcMFileManager.cs +++ b/Services/MFileManager/SvcMFileManager.cs @@ -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("defaultImage"); } public async Task> GetFilesFromLog(int Tags, int Proceso) @@ -26,8 +27,7 @@ namespace AOLBackend.Services.MFileManager public async Task 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)) diff --git a/appsettings.Development.json b/appsettings.Development.json index 7fe3839..86089d3 100644 --- a/appsettings.Development.json +++ b/appsettings.Development.json @@ -11,8 +11,6 @@ }, "pathArchivoElectronico": "C:\\downs\\ArchivoElectronicoSIR\\www.gemcousa.com\\SIR-GEMCO\\DOCS-SIR\\", "pathTemp": "C:\\downs\\temp\\", - "pathFotosBodega": "c:\\data\\Bodega\\Fotos\\", - "pathZipCorresponsales": "C:\\data\\", - "CorresponsalesFilePath": "C:\\data\\", + "defaultImage": "C:\\downs\\empty.png", "Allfiles": "C:\\data\\AOL\\" } diff --git a/appsettings.json b/appsettings.json index 6188e26..51cde0e 100644 --- a/appsettings.json +++ b/appsettings.json @@ -29,8 +29,6 @@ "EmailPassword": "Al%G22a3", "pathArchivoElectronico": "D:\\data\\ArchivoElectronicoSIR\\www.gemcousa.com\\SIR-GEMCO\\DOCS-SIR\\", "pathTemp": "D:\\data\\temp\\", - "pathFotosBodega": "D:\\data\\Bodega\\Fotos\\", - "pathZipCorresponsales": "D:\\data\\Corresponsales\\Zips\\", - "CorresponsalesFilePath": "D:\\data\\Corresponsales\\", + "defaultImage": "D:\\downs\\empty.png", "AllFiles": "D:\\data\\AOL\\" }