Skip to content
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

Merged
merged 4 commits into from
Nov 30, 2022

Conversation

klakhov
Copy link
Contributor

@klakhov klakhov commented Nov 30, 2022

Motivation and context

Resolved #5274

  • Fixed typo in tests

How has this been tested?

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@klakhov
Copy link
Contributor Author

klakhov commented Nov 30, 2022

@bsekachev Could you look on this pr?

'.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');
Copy link
Member

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?

'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');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same comment

@bsekachev
Copy link
Member

Please, look at eslint issues

@bsekachev
Copy link
Member

okay, issues related with core part, I will merge it as is.

@bsekachev bsekachev merged commit 19b2643 into develop Nov 30, 2022
@nmanovic nmanovic deleted the kl/fix-issue-5274 branch November 30, 2022 21:19
@nmanovic nmanovic mentioned this pull request Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: File must be file instance with ZIP extension
2 participants