Skip to content

Commit

Permalink
feat(locals): Support ODS file format, see #308
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Nov 8, 2023
1 parent 41309d2 commit 7076a14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/SubmissionForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const SUPPORTED_MIME_TYPES = [
'application/msexcel',
'application/vnd.ms-excel',
'application/vnd.ms-office',
'application/vnd.oasis.opendocument.spreadsheet',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd-xls',
'application/x-dos_ms_excel',
Expand Down Expand Up @@ -317,7 +318,9 @@ const SubmissionForm = () => {
if (e.target.files.length !== 1) {
setMessage('Merci de soumettre un unique fichier !');
} else if (!SUPPORTED_MIME_TYPES.includes(e.target.files?.[0]?.type)) {
setMessage('Les formats de fichier acceptés sont .csv, .xls et .xlsx !');
setMessage(
'Les formats de fichier acceptés sont .csv, .ods, .xls et .xlsx !',
);
} else {
const inputFile = e.target.files[0];
if (inputFile?.type === 'text/csv') {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Project/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Col, Container, Row } from '@dataesr/react-dsfr';
import React from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
import { FormattedMessage } from 'react-intl';

import CardLogo from '../../components/CardLogo';
import useLang from '../../utils/Hooks/useLang';
Expand Down

0 comments on commit 7076a14

Please sign in to comment.