diff --git a/src/index.ts b/src/index.ts index ef7637be..f24c9d21 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,6 +25,7 @@ import { UploadOptions } from './lib/api/upload/types'; import { StoreUploadOptions } from './lib/api/upload'; import { PreviewOptions } from './lib/api/preview'; import { FilestackError } from './filestack_error'; +import { getMimetype } from './lib/utils/index'; /** * Initialize client with given config @@ -67,5 +68,6 @@ export { PickerResponse, Client, FilestackError, - PickerDisplayMode + PickerDisplayMode, + getMimetype }; diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 3c0d2d03..0d6343e0 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -136,8 +136,8 @@ export const md5 = (data: any): string => { export const getMimetype = (file: Uint8Array | Buffer, name?: string): string => { let type = fileType(file); - // check x-ms by extension - if (type && type.mime !== 'application/x-ms') { + // check x-ms and x-msi by extension + if (type && (type.mime !== 'application/x-ms' && type.mime !== 'application/x-msi')) { return type.mime; }