Skip to content

Commit

Permalink
Extend file upload to support Excel and ODS
Browse files Browse the repository at this point in the history
Signed-off-by: Shevijacobson <[email protected]>
  • Loading branch information
Shevijacobson committed Sep 22, 2024
1 parent f389539 commit 131ed90
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,13 @@ export const ImportApplicationsForm: React.FC<ImportApplicationsFormProps> = ({
}
}}
dropzoneProps={{
accept: { "text/csv": [".csv"] },
onDropRejected: handleFileRejected,
accept: {
"text/csv": [".csv"],
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
[".xlsx"],
"application/vnd.ms-excel": [".xls"],
"application/vnd.oasis.opendocument.spreadsheet": [".ods"],
},
}}
onClearClick={() => {
setFile(undefined);
Expand All @@ -106,7 +111,7 @@ export const ImportApplicationsForm: React.FC<ImportApplicationsFormProps> = ({
<FormHelperText>
<HelperText>
<HelperTextItem variant="error">
You should select a CSV file.
{t("errors.invalidFileFormat")}
</HelperTextItem>
</HelperText>
</FormHelperText>
Expand Down

0 comments on commit 131ed90

Please sign in to comment.