How to upload audio file to s3 via api gateway?

这一生的挚爱 提交于 2020-01-07 07:48:13

问题


I created an API in API Gateway to upload audio files to s3, the file is sending from local PC as multipart/form-data.

API integration request is shown below

In URL Path Parameters, added bucket as param and directly added the bucket name

When I try to upload the file I get an error response,

body: '<?xml version="1.0" encoding="UTF-8"?>\n<Error><Code>InvalidArgument</Code><Message>x-amz-content-sha256 must be UNSIGNED-PAYLOAD, STREAMING-AWS4-HMAC-SHA256-PAYLOAD, or a valid sha256 value.</Message><ArgumentName>x-amz-content-sha256</ArgumentName><ArgumentValue>null</ArgumentValue><RequestId>123445667788</RequestId><HostId>abcd/Jefgh2272vb/ghvsvds+gh+6273gdhsg+gdgshdshdsjdsj=</HostId></Error>'

What are the changes need to be done?


回答1:


After some research, I found some very useful document

please go through this if you also face the same probem!!

added multipart/form-data to binary support in api.



来源:https://stackoverflow.com/questions/43733254/how-to-upload-audio-file-to-s3-via-api-gateway

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!