File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717import { isReadable } from 'isstream' ;
1818import { lookup } from 'mime-types' ;
1919import { basename } from 'path' ;
20- import { loadEsm } from " load-esm" ;
20+ import { loadEsm } from ' load-esm' ;
2121import logger from './logger' ;
2222
23-
2423export interface FileObject {
2524 value : NodeJS . ReadableStream | Buffer | string ;
2625 options ?: FileOptions ;
@@ -78,14 +77,10 @@ export async function getContentType(inputData: NodeJS.ReadableStream | Buffer):
7877 // if the inputData is a Buffer
7978 try {
8079 // Import a pure ESM package from a CommonJS TS project
81- const { fileTypeFromBuffer } = await loadEsm < typeof import ( "file-type" ) > (
82- "file-type"
83- ) ;
84-
80+ const { fileTypeFromBuffer } = await loadEsm < typeof import ( 'file-type' ) > ( 'file-type' ) ;
8581 contentType = await fileTypeFromBuffer ( inputData ) ;
86- logger . debug ( contentType ) ;
8782 } catch ( error ) {
88- logger . debug ( " Error importing module:" , error ) ;
83+ logger . debug ( ' Error importing module:' , error ) ;
8984 }
9085 }
9186
You can’t perform that action at this time.
0 commit comments