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 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);