开发者社区> 问答> 正文

sdk分块copy的例子报错

sdk版本信息:aliyun_java_sdk_20150922
sdk例子文件:UploadPartCopySample
bucket信息:
String sourceBucketName = "app-test";//需要拷贝的bucket
String sourceKey = "fs01/2015/12/28/0/test3.apk";//需要拷贝的key
String targetBucketName = "app-test";//目标bucket
String targetKey = "fs01/2015/12/28/0/test3_multiPartCopy.apk";//目标key


错误信息:
Target object does not reside in the same data center as source object.


太奇怪了,同一个bucket之间的copy怎么会报这个错误呢?

展开
收起
mrzone 2015-12-29 11:28:28 5212 0
1 条回答
写回答
取消 提交回答
  • 回 楼主(mrzone) 的帖子
                            UploadPartCopyRequest uploadPartCopyRequest = new UploadPartCopyRequest(sourceBucketName, sourceKey,
                    targetBucketName, targetKey);
                uploadPartCopyRequest.setBucketName(targetBucketName);
                uploadPartCopyRequest.setKey(targetKey);
                uploadPartCopyRequest.setUploadId(uploadId);
                uploadPartCopyRequest.setPartSize(size);
                uploadPartCopyRequest.setBeginIndex(skipBytes);
                uploadPartCopyRequest.setPartNumber(i + 1);
                
                UploadPartCopyResult uploadPartCopyResult = client.uploadPartCopy(uploadPartCopyRequest);
    2015-12-29 11:37:43
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
从 SDK 到编解码:视频直播架构解析 立即下载
跨平台的云服务SDK需要什么 立即下载
一个跨平台的云服务SDK需要什么 立即下载