Skip to content

Commit 2bab115

Browse files
skip catch
1 parent af3863d commit 2bab115

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib/api/upload/file_tools.browser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ export const getFile = (input: InputFile, sanitizeOptions?: SanitizeOptions): Pr
179179
async res => {
180180
let mime = file.type;
181181
let minimumBytes = 4100;
182-
console.log("just for fun")
183182
if (!file.type || file.type.length === 0 || file.type === 'text/plain') {
184183
mime = await getMimetype(await res.slice(0, minimumBytes), filename);
185184
}

src/lib/utils/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Prom
106106
try {
107107
type = await fromBuffer(file);
108108
} catch(e) {
109-
const mime = extensionToMime(name);
110-
if (mime) {
111-
return mime;
112-
}
109+
// const mime = extensionToMime(name);
110+
// if (mime) {
111+
// return mime;
112+
// }
113+
console.log("catching")
113114
}
114115
const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip'];
115116

0 commit comments

Comments
 (0)