We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0298c1f commit b5852eeCopy full SHA for b5852ee
src/apiGateway.ts
@@ -34,7 +34,7 @@ export function httpRequestToEvent(request: Request): APIGatewayProxyEventV2 {
34
}
35
);
36
37
- const bodyString = request.body.toString('utf8');
+ const bodyString = Buffer.isBuffer(request.body) ? request.body.toString('utf8') : '';
38
const shouldSendBase64 = request.method === 'GET' ? false : bodyString.includes('Content-Disposition: form-data');
39
40
const cookies = request.headers.cookie ? request.headers.cookie.split('; ') : [];
0 commit comments