File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed 
packages/common/pipes/file Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 11import  {  FileValidator  }  from  './file-validator.interface' ; 
2- import  {  FileTypeValidatorOptions ,  IFile  }  from  './interfaces' ; 
2+ import  {  IFile  }  from  './interfaces' ; 
3+ 
4+ export  type  FileTypeValidatorOptions  =  { 
5+   fileType : string  |  RegExp ; 
6+ 
7+   /** 
8+    * If `true`, the validator will skip the magic numbers validation. 
9+    * This can be useful when you can't identify some files as there are no common magic numbers available for some file types. 
10+    * @default  false 
11+    */ 
12+   skipMagicNumbersValidation ?: boolean ; 
13+ } ; 
314
415/** 
516 * Defines the built-in FileTypeValidator. It validates incoming files by examining 
Original file line number Diff line number Diff line change @@ -3,14 +3,3 @@ export interface IFile {
33  size : number ; 
44  buffer ?: Buffer ; 
55} 
6- 
7- export  type  FileTypeValidatorOptions  =  { 
8-   fileType : string  |  RegExp ; 
9- 
10-   /** 
11-    * If `true`, the validator will skip the magic numbers validation. 
12-    * This can be useful when you can't identify some files as there are no common magic numbers available for some file types. 
13-    * @default  false 
14-    */ 
15-   skipMagicNumbersValidation ?: boolean ; 
16- } ; 
Original file line number Diff line number Diff line change 1- import  {  FileTypeValidator  }  from  './file-type.validator' ; 
1+ import  { 
2+   FileTypeValidator , 
3+   FileTypeValidatorOptions , 
4+ }  from  './file-type.validator' ; 
25import  {  FileValidator  }  from  './file-validator.interface' ; 
36import  { 
47  MaxFileSizeValidator , 
58  MaxFileSizeValidatorOptions , 
69}  from  './max-file-size.validator' ; 
710import  {  ParseFileOptions  }  from  './parse-file-options.interface' ; 
811import  {  ParseFilePipe  }  from  './parse-file.pipe' ; 
9- import  {  FileTypeValidatorOptions  }  from  './interfaces' ; 
1012
1113/** 
1214 * @publicApi  
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments