diff --git a/src/apiGateway.ts b/src/apiGateway.ts index 6c69703..fcc6937 100644 --- a/src/apiGateway.ts +++ b/src/apiGateway.ts @@ -35,7 +35,12 @@ export function httpRequestToEvent(request: Request): APIGatewayProxyEventV2 { ); const bodyString = Buffer.isBuffer(request.body) ? request.body.toString('utf8') : ''; - const shouldSendBase64 = request.method === 'GET' ? false : bodyString.includes('Content-Disposition: form-data'); + const shouldSendBase64 = request.method === 'GET' + ? false + : ( + bodyString.includes('Content-Disposition: form-data') || + (headers['content-disposition']?.startsWith('inline;') === true) + ); const cookies = request.headers.cookie ? request.headers.cookie.split('; ') : [];