Skip to content

Commit

Permalink
[skip ci] changed error message
Browse files Browse the repository at this point in the history
  • Loading branch information
klakhov committed Nov 30, 2022
1 parent 0dbf236 commit 965160f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cvat-core/src/annotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,15 @@ export function importDataset(
'.zip', '.xml', '.json',
];
if (typeof file === 'string' && !(allowedFileExtensions.some((ext) => file.toLowerCase().endsWith(ext)))) {
throw new ArgumentError('File must be file instance with ZIP extension');
throw new ArgumentError('File must be file instance with eigther ZIP, XML or JSON extension');
}
const allowedMimeTypes = [
'application/zip', 'application/x-zip-compressed',
'application/xml', 'text/xml',
'application/json',
];
if (file instanceof File && !(allowedMimeTypes.includes(file.type))) {
throw new ArgumentError('File must be file instance with ZIP extension');
throw new ArgumentError('File must be file instance with eigther ZIP, XML or JSON extension');
}

if (instance instanceof Project) {
Expand Down

0 comments on commit 965160f

Please sign in to comment.