1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-12 01:40:53 +01:00

Fix name logic

This commit is contained in:
Nayam Amarshe 2024-04-21 23:10:54 +05:30
parent 938bc0d83a
commit aa84f7de1d
2 changed files with 16 additions and 6 deletions

View File

@ -55,9 +55,14 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
const customWidth = useCustomWidth ? payload.customWidth : "";
const outFile =
outputDir + slash + fileName + "_upscayl_" + useCustomWidth
? `${customWidth}px_`
: `${scale}x_` + model + "." + saveImageAs;
outputDir +
slash +
fileName +
"_upscayl_" +
(useCustomWidth ? `${customWidth}px_` : `${scale}x_`) +
model +
"." +
saveImageAs;
// UPSCALE
let upscayl = spawnUpscayl(

View File

@ -64,9 +64,14 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
const scale = payload.scale;
const outFile =
outputDir + slash + fileName + "_upscayl_" + useCustomWidth
? `${customWidth}px_`
: `${scale}x_` + model + "." + saveImageAs;
outputDir +
slash +
fileName +
"_upscayl_" +
(useCustomWidth ? `${customWidth}px_` : `${scale}x_`) +
model +
"." +
saveImageAs;
// UPSCALE
if (fs.existsSync(outFile) && !overwrite) {