更新时间:2023-11-27 18:32:34
遇到了同样的问题.发现我用来创建预签名URL的内容类型与我发送给S3的对象的内容类型不匹配.我建议您在创建预签名的URL时添加Expiration标头(我也这样做),并在控制台中准确检查在对S3进行放置时要发送的内容类型.另外,数据只需要是文件,而不是您在那里创建的结构.
Faced the same issue. Found out that the content-type that I used to create the pre-signed URL was not matching the content-type of the object I was sending to S3. I would suggest you add Expiration header when creating the pre-signed URL (I did too) and check in the console exactly what the content-type is being sent when you do a put to S3. Also, the data just needs to be the file, and not the struct you've created there.