diff --git a/src/lib/api/upload/file_tools.browser.ts b/src/lib/api/upload/file_tools.browser.ts index 5acf9f59..7a2bb89a 100644 --- a/src/lib/api/upload/file_tools.browser.ts +++ b/src/lib/api/upload/file_tools.browser.ts @@ -181,7 +181,6 @@ export const getFile = (input: InputFile, sanitizeOptions?: SanitizeOptions): Pr let minimumBytes = 4100; console.log(!file.type) if (!file.type || file.type.length === 0 || file.type === 'text/plain') { - console.log("just for fun"); mime = await getMimetype(await res.slice(0, minimumBytes), filename); } diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index fc346050..6b467206 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -86,6 +86,7 @@ export const uniqueTime = () => { return last; }; +console.log("just for fun"); /** * Generates random string with provided length * @@ -102,6 +103,8 @@ export const uniqueId = (len: number = 10): string => { * @returns {string} - mimetype */ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Promise => { + console.log("just for fun"); + let type = await fromBuffer(file); console.log("reaches here") const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip'];