-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowed to upload .xml
and .json
annotation files from UI
#5386
Conversation
53afc1e
to
965160f
Compare
@bsekachev Could you look on this pr? |
cvat-core/src/annotations.ts
Outdated
'.zip', '.xml', '.json', | ||
]; | ||
if (typeof file === 'string' && !(allowedFileExtensions.some((ext) => file.toLowerCase().endsWith(ext)))) { | ||
throw new ArgumentError('File must be file instance with eigther ZIP, XML or JSON extension'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe to use allowedFileExtensions
list in this message?
cvat-core/src/annotations.ts
Outdated
'application/json', | ||
]; | ||
if (file instanceof File && !(allowedMimeTypes.includes(file.type))) { | ||
throw new ArgumentError('File must be file instance with eigther ZIP, XML or JSON extension'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment
Please, look at eslint issues |
okay, issues related with core part, I will merge it as is. |
Motivation and context
Resolved #5274
How has this been tested?
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.