Body of events.APIGatewayProxyRequest for Binary Data
- Langage dominant
- Go
- Étoiles
- 3.8k
- Forks
- 578
- Merge moyen
- 8 h 18 min
- PR mergées (30 j)
- 1
Description
Hi !
We're testing binary data upload to lambda handler in Golang, but found something strange.
From Settings of API Gateway, there is one type *application/octet-stream* to support any binary format. It's using **AWS Lambda proxy integrations**, so that it doesn't need to set **content handling**.
The size local file file is **280432**, once uploaded to lambda Golang handler, the size of **events.APIGatewayProxyRequest::body** becomes **509869**. By printing the data of body which is a string, it _looks_ like binary with \u0000, but the boolean value **events.APIGatewayProxyRequest::IsBase64Encoded** is always still **false**. In contrast, use openssl to encode the local file in base64, the size of output file is only **379755**, much smaller than body.
Is there any extra tips to handle binary data properly ? Thanks in advance.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par les champs body et IsBase64Encoded de events.APIGatewayProxyRequest, puis reproduisez l’upload application/octet-stream de 280432 octets signalé via l’intégration proxy AWS Lambda. Comparez le body reçu et le flag avec les paramètres de données binaires d’API Gateway décrits dans l’issue. Le travail est terminé lorsque vous avez documenté si le comportement est attendu et identifié la configuration ou le traitement nécessaires pour les uploads binaires.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- aws, go
- Domaine
- api, backend, cloud
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 30/100