小编use*_*983的帖子

S3 分段上传的 Google Cloud Storage 支持

目前,我在“互操作模式”下使用 GCS 以使其接受 S3 API 请求。通过使用这里的官方分段上传示例(+设置适当的端点),第一次发起 POST 请求:

POST /bucket/object?uploads HTTP/1.1
Host: storage.googleapis.com
Authorization: AWS KEY:SIGNATURE
Date: Wed, 07 Jan 2015 13:34:04 GMT
User-Agent: aws-sdk-java/1.7.5 Linux/3.13.0-43-generic Java_HotSpot(TM)_64-Bit_Server_VM/24.72-b04/1.7.0_72
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Transfer-Encoding: chunked
Connection: Keep-Alive
Run Code Online (Sandbox Code Playgroud)

导致此响应:

HTTP/1.1 400 Bad Request
Content-Length: 55
Date: Wed, 07 Jan 2015 13:34:05 GMT
Server: UploadServer ("Built on Dec 19 2014 ...")
Content-Type: text/html; charset=UTF-8
Alternate-Protocol: 443:quic,p=0.02

The request's content type is not accepted on this URL.
Run Code Online (Sandbox Code Playgroud)

这可能是 AWS 客户端问题还是 GCS 不支持 S3 的分段上传? …

file-upload google-cloud-storage aws-sdk

4
推荐指数
2
解决办法
3756
查看次数