Add canonical CV artifact pipeline
This commit is contained in:
@@ -7,6 +7,7 @@ namespace JobTrackerApi.Services
|
||||
{
|
||||
public string DataRoot { get; }
|
||||
public string AttachmentsRoot { get; }
|
||||
public string CvArtifactsRoot { get; }
|
||||
|
||||
public AppPaths(IConfiguration cfg, IHostEnvironment env)
|
||||
{
|
||||
@@ -23,6 +24,13 @@ namespace JobTrackerApi.Services
|
||||
|
||||
Directory.CreateDirectory(attachmentsRoot);
|
||||
AttachmentsRoot = attachmentsRoot;
|
||||
|
||||
var cvArtifactsRoot = (cfg["Data:CvArtifactsRoot"] ?? "").Trim();
|
||||
if (string.IsNullOrWhiteSpace(cvArtifactsRoot)) cvArtifactsRoot = Path.Combine(DataRoot, "CvArtifacts");
|
||||
if (!Path.IsPathRooted(cvArtifactsRoot)) cvArtifactsRoot = Path.Combine(env.ContentRootPath, cvArtifactsRoot);
|
||||
|
||||
Directory.CreateDirectory(cvArtifactsRoot);
|
||||
CvArtifactsRoot = cvArtifactsRoot;
|
||||
}
|
||||
|
||||
public string GetDbPath(string fileName = "jobtracker.db") => Path.Combine(DataRoot, fileName);
|
||||
|
||||
Reference in New Issue
Block a user