Tengo un archivo en mi carpeta de descargas que quiero enviar al punto final de aws lambda.
import * as fs from 'fs'; import { APIGatewayProxyEvent } from 'aws-lambda'; let filepath = '/Users/myUserName/Downloads/test.jpg'; let filedata = fs.readFileSync(filepath); let event = {body: filedata} as APIGatewayProxyEvent;pero me sale un error
Conversion of type '{ body: Buffer; }' to type 'APIGatewayProxyEvent' may be a mistake because neither type sufficiently overlaps with the other. ¿Debo enviar datos de archivo usando un campo diferente al del body ?