mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-12 08:04:34 +08:00
Merge pull request #570 from rekonder/aj-SCI-1088
My profile - avatar size fix [SCI-1088]
This commit is contained in:
commit
081aa4aea7
1 changed files with 6 additions and 1 deletions
|
@ -159,7 +159,12 @@ function filesSizeValidator(ev, fileInputs, fileTypeEnum) {
|
||||||
})
|
})
|
||||||
|
|
||||||
if (size > fileTypeEnum) {
|
if (size > fileTypeEnum) {
|
||||||
return "<%= I18n.t('general.file.total_size', size: Constants::FILE_MAX_SIZE_MB) %>".strToErrorFormat();
|
switch (fileTypeEnum) {
|
||||||
|
case FileTypeEnum.FILE:
|
||||||
|
return "<%= I18n.t('general.file.total_size', size: Constants::FILE_MAX_SIZE_MB) %>".strToErrorFormat();
|
||||||
|
case FileTypeEnum.AVATAR:
|
||||||
|
return "<%= I18n.t('general.file.total_size', size: Constants::AVATAR_MAX_SIZE_MB) %>".strToErrorFormat();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue