From 8fa08bcc6c98721133640da0dcf2521e425649f5 Mon Sep 17 00:00:00 2001 From: douglasprod <36680471+douglasprod@users.noreply.github.com> Date: Thu, 28 May 2026 15:36:44 +0300 Subject: [PATCH] Update download.js --- packages/nexrender-core/src/tasks/download.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nexrender-core/src/tasks/download.js b/packages/nexrender-core/src/tasks/download.js index db3789b0..53923cf6 100644 --- a/packages/nexrender-core/src/tasks/download.js +++ b/packages/nexrender-core/src/tasks/download.js @@ -33,8 +33,9 @@ const download = (job, settings, asset) => { if (protocol === 'data' && !asset.layerName) { destName = Math.random().toString(36).substring(2); } else { - // Use uri.pathname to avoid issues with forward slashes in query parameters (e.g., Adobe Scene7 URLs) - destName = uri.pathname || path.basename(asset.src) + // Use uri.pathname to avoid issues with forward slashes in query parameters (e.g., Adobe Scene7 URLs), + // then take basename so only the file name is used (not the full url path, which would create subfolders) + destName = path.basename(uri.pathname || asset.src) destName = destName.indexOf('?') !== -1 ? destName.slice(0, destName.indexOf('?')) : destName; /* ^ remove possible query search string params ^ */ destName = decodeURI(destName) /* < remove/decode any special URI symbols within filename */