Body of events.APIGatewayProxyRequest for Binary Data
- Ngôn ngữ chính
- Go
- Star
- 3.8k
- Fork
- 578
- Merge trung bình
- 8 giờ 18 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với các trường body và IsBase64Encoded của events.APIGatewayProxyRequest, sau đó tái hiện lượt upload application/octet-stream 280432 byte đã được báo cáo thông qua tích hợp proxy của AWS Lambda. So sánh body nhận được và cờ này với các cài đặt dữ liệu nhị phân của API Gateway được mô tả trong issue. Hoàn tất có nghĩa là ghi lại liệu hành vi này có được mong đợi hay không, đồng thời xác định cấu hình hoặc cách xử lý cần thiết cho các lượt upload nhị phân.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- aws, go
- Lĩnh vực
- api, backend, cloud
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100