Google Cloud Storage 支持 S3 分段上传 [英] Google Cloud Storage support of S3 multipart upload

查看:34
本文介绍了Google Cloud Storage 支持 S3 分段上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Currenty, i'm using GCS in "interoperability mode" to make it accept S3 API requests. By using the official multipart upload example here (+ setting the appropriate endpoint), the first initiation POST request:

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

导致此响应:

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.

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

Could that be an AWS client issue or GCS doesn't support S3's multipart upload yet?

我尝试过的大多数其他操作(下载对象、列出存储桶对象等)似乎都可以正常工作.

Most of the other actions i have tried (download object, list bucket objects etc) seem to work fine.

推荐答案

更新: 自 2021 年 5 月起,Google Cloud Storage (GCS) 支持与 S3 兼容的分段上传.
https://cloud.google.com/storage/docs/multipart-uploads

Update: As of May 2021, Google Cloud Storage (GCS) supports S3-compatible multipart uploads.
https://cloud.google.com/storage/docs/multipart-uploads

配置适当的终端节点后,AWS SDK 将无缝运行.

The AWS SDK will work seamlessly once you configure the appropriate endpoint.

GSC 不支持 S3 分段上传接口.如果要执行块并行上传,可以使用对象组合 - 请参阅 https://cloud.google.com/storage/docs/composite-objects

这篇关于Google Cloud Storage 支持 S3 分段上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆