IO-2221 Correct filename for targeting thumbs

This commit is contained in:
Allan Carr
2023-07-21 09:22:37 -07:00
parent bfd0932f77
commit f295488195
2 changed files with 11 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ export async function JobsDeleteMedia(req: Request, res: Response) {
FolderPaths.Jobs,
jobid,
FolderPaths.ThumbsSubDir,
file.name
file.name.replace(/\.[^/.]+$/, ".png")
)
);
}
@@ -58,7 +58,7 @@ export async function JobsDeleteMedia(req: Request, res: Response) {
jobid,
FolderPaths.BillsSubDir,
FolderPaths.ThumbsSubDir,
file.name
file.name.replace(/\.[^/.]+$/, ".png")
)
);
}

View File

@@ -59,9 +59,14 @@ export async function JobsMoveMedia(req: Request, res: Response) {
FolderPaths.Jobs,
from_jobid,
FolderPaths.ThumbsSubDir,
file
file.replace(/\.[^/.]+$/, ".png")
),
path.join(FolderPaths.Jobs, jobid, FolderPaths.ThumbsSubDir, file)
path.join(
FolderPaths.Jobs,
jobid,
FolderPaths.ThumbsSubDir,
file.replace(/\.[^/.]+$/, ".png")
)
)
);
}
@@ -85,14 +90,14 @@ export async function JobsMoveMedia(req: Request, res: Response) {
from_jobid,
FolderPaths.BillsSubDir,
FolderPaths.ThumbsSubDir,
file
file.replace(/\.[^/.]+$/, ".png")
),
path.join(
FolderPaths.Jobs,
jobid,
FolderPaths.BillsSubDir,
FolderPaths.ThumbsSubDir,
file
file.replace(/\.[^/.]+$/, ".png")
)
)
);