@experium/findy-form 1.2.45 → 1.2.46
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/app.js +1 -1
- package/lib/utils/validation.js +1 -1
- package/package.json +1 -1
- package/src/utils/validation.js +1 -1
package/lib/utils/validation.js
CHANGED
|
@@ -44,7 +44,7 @@ var checkFileType = function checkFileType(fileType, mimeType, extenstion) {
|
|
|
44
44
|
return allowFileTypes ? (0, _ramda.contains)(mimeType, (0, _ramda.split)(',', (0, _ramda.replace)(/\s/g, '', allowFileTypes))) : true;
|
|
45
45
|
|
|
46
46
|
default:
|
|
47
|
-
return allowFileTypes ? allowFileExtensions[fileType] : _allowFileExtensions.defaultAllowFileExtensions[fileType];
|
|
47
|
+
return !fileType || (allowFileTypes ? allowFileExtensions[fileType][extenstion] : _allowFileExtensions.defaultAllowFileExtensions[fileType][extenstion]);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
|
package/package.json
CHANGED
package/src/utils/validation.js
CHANGED
|
@@ -24,7 +24,7 @@ export const checkFileType = (fileType, mimeType, extenstion, allowFileExtension
|
|
|
24
24
|
|
|
25
25
|
return allowFileTypes ? contains(mimeType, split(',', replace(/\s/g, '', allowFileTypes))) : true;
|
|
26
26
|
default:
|
|
27
|
-
return allowFileTypes ? allowFileExtensions[fileType] : defaultAllowFileExtensions[fileType];
|
|
27
|
+
return !fileType || (allowFileTypes ? allowFileExtensions[fileType][extenstion] : defaultAllowFileExtensions[fileType][extenstion]);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
export const getFileTypeMessage = (type, allowFileExtensions = {}) => {
|