-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathindex.ts
More file actions
29 lines (26 loc) · 981 Bytes
/
index.ts
File metadata and controls
29 lines (26 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
* @adonisjs/bodyparser
*
* (c) AdonisJS
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import type { Multipart } from './src/multipart/main.ts'
import { MultipartFile } from './src/multipart/file.ts'
import type { FileValidationOptions } from './src/types.ts'
export { defineConfig } from './src/define_config.ts'
export { MultipartFile, Multipart }
/**
* Extending HttpRequest class with custom properties.
*/
declare module '@adonisjs/http-server' {
export interface HttpRequest {
multipart: Multipart
bodyType: 'unknown' | 'urlencoded' | 'multipart' | 'json' | 'raw'
__raw_files: Record<string, MultipartFile | MultipartFile[]>
allFiles(): Record<string, MultipartFile | MultipartFile[]>
file(key: string, options?: Partial<FileValidationOptions>): MultipartFile | null
files(key: string, options?: Partial<FileValidationOptions>): MultipartFile[]
}
}