Skip to content

Commit

Permalink
handle
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-singh-filestack committed Jan 22, 2024
1 parent decd48c commit 21c10f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ 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 === undefined && e.message === 'Buffer is not defined') {
if (!name) {
console.log("here: ", name);
return 'image/png';
}
Expand Down

0 comments on commit 21c10f1

Please sign in to comment.