Przeglądaj źródła

pass files array to _checkRestrictions in _checkAndCreateFileStateObject via addFiles (#2655)

Artur Paikin 4 lat temu
rodzic
commit
449798d964
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      packages/@uppy/core/src/index.js

+ 2 - 1
packages/@uppy/core/src/index.js

@@ -653,7 +653,8 @@ class Uppy {
     }
 
     try {
-      this._checkRestrictions(newFile)
+      const filesArray = Object.keys(files).map(i => files[i])
+      this._checkRestrictions(newFile, filesArray)
     } catch (err) {
       this._showOrLogErrorAndThrow(err, { file: newFile })
     }