-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.ts
28 lines (25 loc) · 903 Bytes
/
index.ts
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
/*
* @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.js'
import { MultipartFile } from './src/multipart/file.js'
import type { FileValidationOptions } from './src/types.js'
export { defineConfig } from './src/define_config.js'
export { MultipartFile, Multipart }
/**
* Extending request class with custom properties.
*/
declare module '@adonisjs/http-server' {
export interface Request {
multipart: Multipart
__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[]
}
}