Skip to content

Commit

Permalink
remove buggy consoles
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-singh-filestack committed Jan 4, 2024
1 parent 66bb564 commit 374f41c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/lib/api/upload/file_tools.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ export const getFile = (input: InputFile, sanitizeOptions?: SanitizeOptions): Pr
let mime = file.type;
let minimumBytes = 4100;
if (!file.type || file.type.length === 0 || file.type === 'text/plain') {
console.log("file type: ",file.type)
mime = await getMimetype(await res.slice(0, minimumBytes), filename);
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/utils/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const ExtensionsMap = {
'iso',
'msp',
'buffer',
'tdms',
],
'application/oda': ['oda'],
'application/oebps-package+xml': ['opf'],
Expand Down
1 change: 0 additions & 1 deletion src/lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export const uniqueId = (len: number = 10): string => {
*/
export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Promise<string> => {
let type = await fromBuffer(file);
console.log("type: ",type)
const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip'];

if (type && excludedMimetypes.indexOf(type.mime) === -1) {
Expand Down

0 comments on commit 374f41c

Please sign in to comment.