TS: contentDisposition does not exist in type 'Options'
DavideViolante opened this issue · 1 comments
DavideViolante commented
storage: multerS3({
s3: s3,
bucket: `mybucket`,
acl: 'public-read',
contentDisposition: 'attachment', // <= this property shows an error in TypeScript
contentType: (req, file, cb) => {
cb(null, 'application/pdf');
},
key: (req, file, cb) => {
cb(null, file.originalname);
},
}),
Error shows at that line:
Argument of type '{ s3: S3; bucket: string; acl: string; contentDisposition: string; contentType: (req: Request, file: File, cb: (error: any, mime?: string, stream?: ReadableStream) => void) => void; key: (req: Request, file: File, cb: (error: any, key?: string) => void) => void; }' is not assignable to parameter of type 'Options'.
Object literal may only specify known properties, and 'contentDisposition' does not exist in type 'Options'.ts(2345)
DavideViolante commented
Fixed in the PR above.