Class ApiUploadV2AbortUpload
- java.lang.Object
-
- com.qiniu.storage.Api
-
- com.qiniu.storage.ApiUpload
-
- com.qiniu.storage.ApiUploadV2AbortUpload
-
public class ApiUploadV2AbortUpload extends ApiUpload
分片上传 v2 版 api: 终止上传 该接口根据 UploadId 终止 Multipart Upload 。一个文件被分成多个 part,上传所有的 part,然后在七牛云根据 part 信息合成文件 |----------------------------- file -----------------------------| |------ part ------|------ part ------|------ part ------|... |----- etag01 -----|----- etag02 -----|----- etag03 -----|... allBlockCtx = [{"partNumber":1, "etag", etag01}, {"partNumber":2, "etag", etag02}, {"partNumber":3, "etag", etag03}, ...]
上传过程: 1. 调用
ApiUploadV2InitUploadapi 创建一个 upload 任务,获取 uploadIdApiUploadV2InitUpload.Response.getUploadId()2. 重复调用ApiUploadV2UploadPartapi 直到文件所有的 part 均上传完毕, part 的大小可以不相同 3. 调用ApiUploadV2CompleteUploadapi 组装 api 选用接口: 1.ApiUploadV2ListParts列举已上传的 part 信息 2.ApiUploadV2AbortUpload终止上传注意事项: 1. partNumber 范围是 1 ~ 10000 2. 除最后一个 Part 外,单个 Part 大小范围 1 MB ~ 1 GB 3. 如果你用同一个 PartNumber 上传了新的数据,那么服务端已有的这个号码的 Part 数据将被覆盖 4.
ApiUploadV2InitUpload、ApiUploadV2UploadPart、ApiUploadV2CompleteUpload、ApiUploadV2ListParts、ApiUploadV2AbortUpload分片 V2 API的 key 需要统一(要么有设置且相同,要么均不设置)https://developer.qiniu.com/kodo/6367/abort-multipart-upload
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApiUploadV2AbortUpload.Request请求信息static classApiUploadV2AbortUpload.Response响应信息
-
Constructor Summary
Constructors Constructor Description ApiUploadV2AbortUpload(Client client)api 构建函数
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiUploadV2AbortUpload.Responserequest(ApiUploadV2AbortUpload.Request request)发起请求
-
-
-
Constructor Detail
-
ApiUploadV2AbortUpload
public ApiUploadV2AbortUpload(Client client)
api 构建函数- Parameters:
client- 请求client 【必须】
-
-
Method Detail
-
request
public ApiUploadV2AbortUpload.Response request(ApiUploadV2AbortUpload.Request request) throws QiniuException
发起请求- Parameters:
request- 请求对象 【必须】- Returns:
- 响应对象
- Throws:
QiniuException- 请求异常
-
-