From 00f5cad69fc8852b9dac6475538eebe90395cf2e Mon Sep 17 00:00:00 2001 From: Aishwarya Date: Mon, 22 Jun 2026 18:04:12 +0530 Subject: [PATCH 1/2] fix: sanitize filename before processing in upload route --- upload-api/src/routes/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upload-api/src/routes/index.ts b/upload-api/src/routes/index.ts index d6157c24d..16e187161 100644 --- a/upload-api/src/routes/index.ts +++ b/upload-api/src/routes/index.ts @@ -373,7 +373,8 @@ router.get( return res.send('Filename could not be determined from the local path.'); } - const name = fileName?.split?.('.')?.[0]; + + const name = sanitizeFilename(fileName?.split?.('.')?.[0] ?? ''); const fileExt = fileName?.split('.')?.pop() ?? ''; const bodyStream = createReadStream(localPath); From 22b34e8082357e96e40ca9178a141db4496dc90b Mon Sep 17 00:00:00 2001 From: Aishwarya Date: Wed, 24 Jun 2026 11:57:46 +0530 Subject: [PATCH 2/2] fix: update sourceType assignment in contentTypeMapper for droplist choices --- upload-api/migration-sitecore/libs/contenttypes.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upload-api/migration-sitecore/libs/contenttypes.js b/upload-api/migration-sitecore/libs/contenttypes.js index 6f488ef44..a471cfd48 100644 --- a/upload-api/migration-sitecore/libs/contenttypes.js +++ b/upload-api/migration-sitecore/libs/contenttypes.js @@ -501,7 +501,9 @@ const contentTypeMapper = ({ if (compType?.content === 'Droplink') { if (sourceTree) { if (item?.content?.includes(configChecker)) { - sourceType = makeUnique({ data: sourceTree?.[item?.content] }); + sourceType = makeUnique({ + data: source?.[item?.content] ?? sourceTree?.[item?.content] + }); compType.content = 'Droplist'; if (isKeyPresent('key', sourceType)) { advanced = false; // 🔧 FIX: Set dropdown advanced to false