Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-singh-filestack committed Jan 22, 2024
1 parent 92d3380 commit decd48c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Prom
type = await fromBuffer(file);
} catch(e) {
console.warn("An exception occurred while processing the buffer:", e.message);
if (!name && e.messsage =='Buffer is not defined') {
console.log("here: ",name);
if (name === undefined && e.message === 'Buffer is not defined') {
console.log("here: ", name);
return 'image/png';
}

}
const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip'];

Expand Down

0 comments on commit decd48c

Please sign in to comment.