mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-09 16:01:30 +08:00
Merge pull request #7878 from aignatov-bio/ai-sci-11081-fix-file-extension-for-file-uploader
Fix file extension validation for file uploader [SCI-11081]
This commit is contained in:
commit
07ba4de28f
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ export default {
|
|||
}
|
||||
|
||||
// check if it's a correct file type
|
||||
const fileExtension = file.name.split('.')[1];
|
||||
const fileExtension = file.name.split('.')[file.name.split('.').length - 1];
|
||||
if (!this.supportedFormats.includes(fileExtension)) {
|
||||
const error = I18n.t('repositories.import_records.dragAndDropUpload.wrongFileTypeError', {
|
||||
extensions: this.supportedFormats.join(', ')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue