mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-25 21:41:31 +02:00
Fixed missing check for maximum allowed files in files field
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
* Moved Remodal in-house and added support for stackable modals [#1698](https://github.com/getgrav/grav-plugin-admin/issues/1698), [#1699](https://github.com/getgrav/grav-plugin-admin/issues/1699)
|
||||
1. [](#bugfix)
|
||||
* Fixed issue with charts in dashboard where label would cut off [#1700](https://github.com/getgrav/grav-plugin-admin/issues/1700)
|
||||
* Fixed missing check for maximum allowed files in `files` field
|
||||
|
||||
# v1.10.0-beta.1
|
||||
## 06/14/2019
|
||||
|
||||
@@ -79,6 +79,12 @@ const ACCEPT_FUNC = function(file, done, settings) {
|
||||
|
||||
setTimeout(() => {
|
||||
let error = '';
|
||||
|
||||
if ((this.options.maxFiles != null) && (this.getAcceptedFiles().length >= this.options.maxFiles)) {
|
||||
done(this.options.dictMaxFilesExceeded.replace('{{maxFiles}}', this.options.maxFiles));
|
||||
return this.emit('maxfilesexceeded', file);
|
||||
}
|
||||
|
||||
if (resolution.min) {
|
||||
Object.keys(resolution.min).forEach((attr) => {
|
||||
if (resolution.min[attr] && file[attr] < resolution.min[attr]) {
|
||||
|
||||
36
themes/grav/js/admin.min.js
vendored
36
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
32
themes/grav/js/vendor.min.js
vendored
32
themes/grav/js/vendor.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user