Self Answer
Very lucky I just found the solution at
binary-media-types
Add this to serverless.yml
.
provider:
# others
apiGateway:
binaryMediaTypes:
- '*/*'
No need serverless-apigw-binary
No need this as well
const binaryMimeTypes = [
'image/gif',
'image/png',
'image/jpeg',
'image/jpg',
];
...
return serverless.createServer(expressApp, null, binaryMimeTypes)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…