Skip to content

Commit d50b292

Browse files
Merge pull request #860 from contentstack/dev
Dev
2 parents ca56c06 + 4590803 commit d50b292

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

ui/src/components/ContentMapper/index.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,3 +414,16 @@ div .table-row {
414414
margin: 0 auto;
415415
}
416416
}
417+
418+
.table-row {
419+
display: flex;
420+
align-items: center;
421+
gap: 8px;
422+
}
423+
.table-row .select {
424+
flex: 1;
425+
}
426+
.advanced-setting-button,
427+
.table-row button {
428+
flex-shrink: 0;
429+
}

ui/src/components/LegacyCms/Actions/LoadFileFormat.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ const LoadFileFormat = (_props: LoadFileFormatProps) => {
5858
isactive: true,
5959
title: extractedFormat === 'zip' ? 'Zip' : extractedFormat.toUpperCase()
6060
};
61-
62-
console.info('LoadFileFormat: DISPATCHING FILE FORMAT:', fileFormatObj);
63-
61+
6462
dispatch(updateNewMigrationData({
6563
...newMigrationData,
6664
legacy_cms: {
@@ -69,31 +67,29 @@ const LoadFileFormat = (_props: LoadFileFormatProps) => {
6967
}
7068
}));
7169

72-
setFileIcon(fileFormatObj.title);
70+
setFileIcon(fileFormatObj?.title);
7371
}
7472
} else if (!isEmptyString(currentFormat)) {
7573
setFileIcon(currentFormat);
7674
}
7775
}, [newMigrationData?.legacy_cms?.uploadedFile?.file_details?.localPath, newMigrationData?.legacy_cms?.selectedFileFormat, dispatch, newMigrationData]);
7876

79-
8077
return (
8178
<div className="p-3">
8279
<div className="col-12">
8380
<label htmlFor="file-format">
8481
<TextInput
85-
value={fileIcon === 'Folder' ? 'DIRECTORY' : fileIcon ? fileIcon : 'file extension not found'}
82+
label="File Format"
83+
value={fileIcon || 'File extension not found'}
8684
version="v2"
8785
isReadOnly={true}
88-
disabled={true}
8986
width="large"
90-
placeholder=""
9187
prefix={
9288
<Icon
93-
icon={fileIcon ? fileIcon : 'CrashedPage'}
89+
icon={fileIcon === 'DIRECTORY' ? 'Folder' : fileIcon ? fileIcon : 'CrashedPage'}
9490
size="medium"
9591
version="v2"
96-
aria-label="fileformat"
92+
aria-label="File format icon"
9793
/>
9894
}
9995
/>

upload-api/src/services/fileProcessing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const handleFileProcessing = async (
4141
file_details: config
4242
};
4343
}
44-
} else if (fileExt === 'xml') {
44+
} else if (fileExt === 'xml' && (cmsType === 'wordpress' || cmsType === 'drupal')) {
4545
if (await validator({ data: zipBuffer, type: cmsType, extension: fileExt })) {
4646
const $ = Cheerio.load(zipBuffer, { xmlMode: true });
4747
const fixedXml = $.xml();

0 commit comments

Comments
 (0)