Explorar el Código

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

Artur Paikin hace 4 años
padre
commit
449798d964
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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 })
     }