diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d7fe38..e4fd6901 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [3.30.1](https://github.com/filestack/filestack-js/compare/v3.30.0...v3.30.1) (2024-02-07) + +### Updgrade + * **picker:** Upgraded picker to v1.26.1. + ## [3.30.0](https://github.com/filestack/filestack-js/compare/v3.29.0...v3.30.0) (2024-01-18) ### Updgrade diff --git a/package-lock.json b/package-lock.json index eaac6627..fe540405 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "filestack-js", - "version": "3.30.0", + "version": "3.30.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 2e647637..4cc9ff0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "filestack-js", - "version": "3.30.0", + "version": "3.30.1", "description": "Official JavaScript library for Filestack", "main": "build/main/index.js", "module": "build/module/index.js", diff --git a/src/config.ts b/src/config.ts index 9d78d4a9..4dc79d90 100644 --- a/src/config.ts +++ b/src/config.ts @@ -18,7 +18,7 @@ /** * @private */ -const PICKER_VERSION = '1.26.0'; +const PICKER_VERSION = '1.26.1'; /** * @private diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index fc01db47..b2fbbafb 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -108,12 +108,6 @@ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Prom } catch(e) { console.warn("An exception occurred while processing the buffer:", e.message); } - const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip']; - - if (type && excludedMimetypes.indexOf(type.mime) === -1) { - return type.mime; - } - if (name && name.indexOf('.') > -1) { const mime = extensionToMime(name); @@ -121,6 +115,11 @@ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Prom return mime; } } + const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip']; + + if (type && excludedMimetypes.indexOf(type.mime) === -1) { + return type.mime; + } try { if (isutf8(file)) {