@types/multer
Advanced tools
+31
-29
@@ -49,3 +49,3 @@ // Type definitions for multer | ||
| /** A function used to determine within which folder the uploaded files should be stored. Defaults to the system's default temporary directory. */ | ||
| destination?: (req: Express.Request, file: Express.Multer.File, callback: (error: Error, destination: string) => void) => void; | ||
| destination?: string | ((req: Express.Request, file: Express.Multer.File, callback: (error: Error, destination: string) => void) => void); | ||
| /** A function used to determine what the file should be named inside the folder. Defaults to a random name with no file extension. */ | ||
@@ -85,32 +85,34 @@ filename?: (req: Express.Request, file: Express.Multer.File, callback: (error: Error, filename: string) => void) => void; | ||
| declare namespace Express { | ||
| export interface Request { | ||
| file: Multer.File; | ||
| files: { | ||
| [fieldname: string]: Multer.File[]; | ||
| }; | ||
| } | ||
| declare global { | ||
| namespace Express { | ||
| export interface Request { | ||
| file: Multer.File; | ||
| files: { | ||
| [fieldname: string]: Multer.File[]; | ||
| }; | ||
| } | ||
| namespace Multer { | ||
| export interface File { | ||
| /** Field name specified in the form */ | ||
| fieldname: string; | ||
| /** Name of the file on the user's computer */ | ||
| originalname: string; | ||
| /** Encoding type of the file */ | ||
| encoding: string; | ||
| /** Mime type of the file */ | ||
| mimetype: string; | ||
| /** Size of the file in bytes */ | ||
| size: number; | ||
| /** The folder to which the file has been saved (DiskStorage) */ | ||
| destination: string; | ||
| /** The name of the file within the destination (DiskStorage) */ | ||
| filename: string; | ||
| /** Location of the uploaded file (DiskStorage) */ | ||
| path: string; | ||
| /** A Buffer of the entire file (MemoryStorage) */ | ||
| buffer: Buffer; | ||
| namespace Multer { | ||
| export interface File { | ||
| /** Field name specified in the form */ | ||
| fieldname: string; | ||
| /** Name of the file on the user's computer */ | ||
| originalname: string; | ||
| /** Encoding type of the file */ | ||
| encoding: string; | ||
| /** Mime type of the file */ | ||
| mimetype: string; | ||
| /** Size of the file in bytes */ | ||
| size: number; | ||
| /** The folder to which the file has been saved (DiskStorage) */ | ||
| destination: string; | ||
| /** The name of the file within the destination (DiskStorage) */ | ||
| filename: string; | ||
| /** Location of the uploaded file (DiskStorage) */ | ||
| path: string; | ||
| /** A Buffer of the entire file (MemoryStorage) */ | ||
| buffer: Buffer; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
| { | ||
| "name": "@types/multer", | ||
| "version": "0.0.31", | ||
| "version": "0.0.32", | ||
| "description": "TypeScript definitions for multer", | ||
@@ -14,5 +14,6 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@types/express": "4.0.*" | ||
| "@types/express": "*" | ||
| }, | ||
| "typings": "index.d.ts" | ||
| "typings": "index.d.ts", | ||
| "typesPublisherContentHash": "9ce1c5bfb386ca9e83bd1b1a0411375861b935ea18931e3b8dddd9061ab1b108" | ||
| } |
+1
-1
@@ -11,3 +11,3 @@ # Installation | ||
| Additional Details | ||
| * Last updated: Thu, 25 Aug 2016 16:56:07 GMT | ||
| * Last updated: Mon, 19 Sep 2016 17:28:59 GMT | ||
| * File structure: ProperModule | ||
@@ -14,0 +14,0 @@ * Library Dependencies: none |
@@ -26,3 +26,3 @@ { | ||
| "hasPackageJson": false, | ||
| "contentHash": "2c78ff255e0a71ae7f757827950f4d8c57a97f7fa2d4424680e3199d9b78dd64" | ||
| "contentHash": "9ce1c5bfb386ca9e83bd1b1a0411375861b935ea18931e3b8dddd9061ab1b108" | ||
| } |
7927
1.59%128
0.79%+ Added
- Removed
Updated