[英]OpenStack Swift Multi Part Upload jclouds
I'm using jclouds Java SDK to interact with the OpenStack resources, I want to upload as multipart yet I didn't find in the SDK how to do that, in the examples I only saw a way to upload multipart but just for the blobs, which is not what I'm using, but nothing for the OpenStack Swift is there anyway to upload multipart to the Swift? 我正在使用jclouds Java SDK与OpenStack资源进行交互,我想以分段方式上传,但我在SDK中未找到如何进行上传的方式,在示例中,我仅看到了一种上传分段方式,但仅针对blob ,这不是我正在使用的东西,但是对于OpenStack Swift而言,没有任何东西可以将分段上传到Swift吗? keep in mind that I'm using the class PutOptions
so I can generate metadata for the file Thanks 请记住,我正在使用类PutOptions
以便可以为文件生成元数据
jclouds offers two layers to work with: the portable BlobStore
layer and the lower-level provider API. jclouds提供了两个可使用的层:可移植的BlobStore
层和较低级别的提供程序API。 You should use the portable layer when possible and can upload multipart via: 您应尽可能使用可移植层,并可以通过以下方式上传分段内容:
blobStore.putBlob(container, blob, new PutOptions().multipart(true));
If you need to use the lower-level provider API to access some other functionality, you can upload individual parts via SwiftApi.getObjectApi.put
then create a SLO manifest via SwiftApi.getStaticLargeObjectApi.replaceManifest
. 如果您需要使用较低级别的供应商API来访问其他一些功能,你可以上传单个零件通过SwiftApi.getObjectApi.put
然后创建通过SLO清单SwiftApi.getStaticLargeObjectApi.replaceManifest
。 The jclouds provider guide has an example of how to get SwiftApi
from ContextBuilder.buildApi
. jclouds提供程序指南中有一个示例,说明如何从ContextBuilder.buildApi
获取SwiftApi
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.