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

View File

@@ -59,9 +59,14 @@ export async function JobsMoveMedia(req: Request, res: Response) {
FolderPaths.Jobs, FolderPaths.Jobs,
from_jobid, from_jobid,
FolderPaths.ThumbsSubDir, 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, from_jobid,
FolderPaths.BillsSubDir, FolderPaths.BillsSubDir,
FolderPaths.ThumbsSubDir, FolderPaths.ThumbsSubDir,
file file.replace(/\.[^/.]+$/, ".png")
), ),
path.join( path.join(
FolderPaths.Jobs, FolderPaths.Jobs,
jobid, jobid,
FolderPaths.BillsSubDir, FolderPaths.BillsSubDir,
FolderPaths.ThumbsSubDir, FolderPaths.ThumbsSubDir,
file file.replace(/\.[^/.]+$/, ".png")
) )
) )
); );