ui-kit-ck-consultant 0.5.187 → 0.5.188
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +26 -19
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +26 -19
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -3055,29 +3055,36 @@ var DropzoneMultiple = /*#__PURE__*/function (_React$Component) {
|
|
3055
3055
|
var name = file.name.split('.');
|
3056
3056
|
|
3057
3057
|
if (_this.checkExtension(name[name.length - 1])) {
|
3058
|
-
|
3058
|
+
if (!_this.props.maxFileSize || _this.props.maxFileSize * 1000000 > file.size) {
|
3059
|
+
var reader = new window.FileReader();
|
3060
|
+
|
3061
|
+
reader.onload = function () {
|
3062
|
+
var base64 = reader.result;
|
3063
|
+
var tmpFiles = _this.state.files;
|
3064
|
+
tmpFiles.push({
|
3065
|
+
base64: base64,
|
3066
|
+
mime: file.type,
|
3067
|
+
name: file.name,
|
3068
|
+
extension: name[name.length - 1],
|
3069
|
+
size: file.size
|
3070
|
+
});
|
3059
3071
|
|
3060
|
-
|
3061
|
-
|
3062
|
-
|
3063
|
-
|
3064
|
-
base64: base64,
|
3065
|
-
mime: file.type,
|
3066
|
-
name: file.name,
|
3067
|
-
extension: name[name.length - 1],
|
3068
|
-
size: file.size
|
3069
|
-
});
|
3072
|
+
_this.setState({
|
3073
|
+
files: tmpFiles
|
3074
|
+
}, function () {
|
3075
|
+
_this.currentFile += 1;
|
3070
3076
|
|
3071
|
-
|
3072
|
-
|
3073
|
-
}
|
3074
|
-
_this.currentFile += 1;
|
3077
|
+
_this.nextFile(files);
|
3078
|
+
});
|
3079
|
+
};
|
3075
3080
|
|
3076
|
-
|
3077
|
-
|
3078
|
-
|
3081
|
+
reader.readAsDataURL(file);
|
3082
|
+
} else {
|
3083
|
+
alert('Fichier trop volumineux');
|
3084
|
+
_this.currentFile += 1;
|
3079
3085
|
|
3080
|
-
|
3086
|
+
_this.nextFile(files);
|
3087
|
+
}
|
3081
3088
|
} else {
|
3082
3089
|
_this.currentFile += 1;
|
3083
3090
|
|