From f29548819563700a397ba3a4b55b7f7ce1da3864 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Fri, 21 Jul 2023 09:22:37 -0700 Subject: [PATCH] IO-2221 Correct filename for targeting thumbs --- jobs/jobsDeleteMedia.ts | 4 ++-- jobs/jobsMoveMedia.ts | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/jobs/jobsDeleteMedia.ts b/jobs/jobsDeleteMedia.ts index 802e7d4..e81b49d 100644 --- a/jobs/jobsDeleteMedia.ts +++ b/jobs/jobsDeleteMedia.ts @@ -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") ) ); } diff --git a/jobs/jobsMoveMedia.ts b/jobs/jobsMoveMedia.ts index 6776691..a895635 100644 --- a/jobs/jobsMoveMedia.ts +++ b/jobs/jobsMoveMedia.ts @@ -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") ) ) );