filestack-js 3.30.0 → 3.30.2
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/CHANGELOG.md +10 -0
- package/build/browser/filestack.esm.js +2 -2
- package/build/browser/filestack.esm.js.map +1 -1
- package/build/browser/filestack.min.js +2 -2
- package/build/browser/filestack.min.js.map +1 -1
- package/build/browser/filestack.umd.js +2 -2
- package/build/browser/filestack.umd.js.map +1 -1
- package/build/browser/manifest.json +2 -2
- package/build/main/config.js +2 -2
- package/build/main/index.d.ts +1 -1
- package/build/main/index.js +2 -2
- package/build/main/lib/utils/extensions.js +7 -1
- package/build/main/lib/utils/index.browser.js +1 -1
- package/build/main/lib/utils/index.js +6 -6
- package/build/main/lib/utils/index.node.js +1 -1
- package/build/main/lib/utils/index.spec.browser.js +1 -1
- package/build/module/config.js +2 -2
- package/build/module/index.d.ts +1 -1
- package/build/module/index.js +2 -2
- package/build/module/lib/utils/extensions.js +7 -1
- package/build/module/lib/utils/index.browser.js +1 -1
- package/build/module/lib/utils/index.js +6 -6
- package/build/module/lib/utils/index.node.js +1 -1
- package/build/module/lib/utils/index.spec.browser.js +1 -1
- package/package.json +1 -1
- package/src/config.ts +1 -1
- package/src/lib/utils/extensions.ts +6 -0
- package/src/lib/utils/index.ts +5 -6
package/package.json
CHANGED
package/src/config.ts
CHANGED
package/src/lib/utils/index.ts
CHANGED
|
@@ -108,12 +108,6 @@ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Prom
|
|
|
108
108
|
} catch(e) {
|
|
109
109
|
console.warn("An exception occurred while processing the buffer:", e.message);
|
|
110
110
|
}
|
|
111
|
-
const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip'];
|
|
112
|
-
|
|
113
|
-
if (type && excludedMimetypes.indexOf(type.mime) === -1) {
|
|
114
|
-
return type.mime;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
111
|
if (name && name.indexOf('.') > -1) {
|
|
118
112
|
const mime = extensionToMime(name);
|
|
119
113
|
|
|
@@ -121,6 +115,11 @@ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Prom
|
|
|
121
115
|
return mime;
|
|
122
116
|
}
|
|
123
117
|
}
|
|
118
|
+
const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip'];
|
|
119
|
+
|
|
120
|
+
if (type && excludedMimetypes.indexOf(type.mime) === -1) {
|
|
121
|
+
return type.mime;
|
|
122
|
+
}
|
|
124
123
|
|
|
125
124
|
try {
|
|
126
125
|
if (isutf8(file)) {
|