Google 云存储与 aws s3 分段上传的兼容性
Google cloud storage compatibility with aws s3 multipart upload
好的,我有一个使用 amazon s3 multipart 的工作应用程序,它们使用 CreateMultipart、UploadPart 和 CompleteMultiPart。
现在我们正在迁移到 google 云存储,我们遇到了 multipart 问题。据我了解 google 不支持 s3 多部分,从这里 获得信息。
所以我看到 google 有最接近的方法 Compose https://cloud.google.com/storage/docs/composite-objects, where I just upload different objects and then send request to combine them, or I can use uploadType=multipart https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload#resumable, but this seems to be completely different from s3 multipart. And there is resumable upload https://cloud.google.com/storage/docs/resumable-uploads,它似乎允许分块上传文件,但没有完整的多部分。
最好的选择是什么?一些服务已经使用了 CreateMultiPart、UploadPart、CompletePart,我需要为这些服务编写 "adapter" 以使它们与 google 云存储兼容。
更新:以下答案不再正确。 GCS 确实支持分段上传:https://cloud.google.com/storage/docs/xml-api/post-object-multipart
你是对的。 Google Cloud Storage 目前不支持分段上传。
分段上传的主要好处是允许多个流从一台或多台机器并行上传,并允许部分上传失败不会破坏整个上传。使用 GCS 获得相同好处的最佳方法是将各个部分作为单独的对象上传,然后使用 Compose 将它们组合成最终对象。事实上,这正是 gsutil 命令行实用程序在并行上传时所做的。
如果您想按顺序在单个流中上传单个对象,并且希望能够在连接丢失时恢复,那么可恢复上传是一个很好的工具。
“uploadtype=multipart”上传有点不同。它们是一种使用 HTTP 多部分请求在单个上传操作中指定对象的完整元数据及其数据的方法。
好的,我有一个使用 amazon s3 multipart 的工作应用程序,它们使用 CreateMultipart、UploadPart 和 CompleteMultiPart。
现在我们正在迁移到 google 云存储,我们遇到了 multipart 问题。据我了解 google 不支持 s3 多部分,从这里
所以我看到 google 有最接近的方法 Compose https://cloud.google.com/storage/docs/composite-objects, where I just upload different objects and then send request to combine them, or I can use uploadType=multipart https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload#resumable, but this seems to be completely different from s3 multipart. And there is resumable upload https://cloud.google.com/storage/docs/resumable-uploads,它似乎允许分块上传文件,但没有完整的多部分。
最好的选择是什么?一些服务已经使用了 CreateMultiPart、UploadPart、CompletePart,我需要为这些服务编写 "adapter" 以使它们与 google 云存储兼容。
更新:以下答案不再正确。 GCS 确实支持分段上传:https://cloud.google.com/storage/docs/xml-api/post-object-multipart
你是对的。 Google Cloud Storage 目前不支持分段上传。
分段上传的主要好处是允许多个流从一台或多台机器并行上传,并允许部分上传失败不会破坏整个上传。使用 GCS 获得相同好处的最佳方法是将各个部分作为单独的对象上传,然后使用 Compose 将它们组合成最终对象。事实上,这正是 gsutil 命令行实用程序在并行上传时所做的。
如果您想按顺序在单个流中上传单个对象,并且希望能够在连接丢失时恢复,那么可恢复上传是一个很好的工具。
“uploadtype=multipart”上传有点不同。它们是一种使用 HTTP 多部分请求在单个上传操作中指定对象的完整元数据及其数据的方法。