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 1
1
import { 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
+ } ;
3
14
4
15
/**
5
16
* 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 {
3
3
size : number ;
4
4
buffer ?: Buffer ;
5
5
}
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' ;
2
5
import { FileValidator } from './file-validator.interface' ;
3
6
import {
4
7
MaxFileSizeValidator ,
5
8
MaxFileSizeValidatorOptions ,
6
9
} from './max-file-size.validator' ;
7
10
import { ParseFileOptions } from './parse-file-options.interface' ;
8
11
import { ParseFilePipe } from './parse-file.pipe' ;
9
- import { FileTypeValidatorOptions } from './interfaces' ;
10
12
11
13
/**
12
14
* @publicApi
You can’t perform that action at this time.
0 commit comments