DocuSign 电子签名 RestApi ChunkedUploads
我有一个关于 ChunkedUploads
的问题.
I have a question about ChunkedUploads
.
目前我正在研究这篇文章的解决方案:
Currently I am working on the solution for this post:
谁能解释一下如何分块发送EnvelopeDefinition
?
Can anyone explain how to send an EnvelopeDefinition
in chunks ?
目前我打电话:
var request = new ChunkedUploadRequest()
{
Data = <how to put the envelopeDefinition content here?>
};
var response = envelopesApi.CreateChunkedUploadAsync( ApiAccountId, request );
编辑
我想了解如何将 EnvelopDefinition 对象包装到 ChunkedUploadRequest 对象中.
I am trying to understand how to wrap an EnvelopDefinition object into a ChunkedUploadRequest object.
尽可能简单:ChunkedUploadRequest 对象的数据属性应该是什么样的?数据应该包含什么?我在官方电子签名文档中找不到关于该主题的任何详细解释:https://docs.docusign.com/esign/restapi/Envelopes/ChunkedUploads/create/#/definitions/chunkedUploadRequest
As simple as possible: What should the data property of the ChunkedUploadRequest object look like? What should the data contain? I cannot find any detailed explanation on the subject in the official eSignature documentation: https://docs.docusign.com/esign/restapi/Envelopes/ChunkedUploads/create/#/definitions/chunkedUploadRequest
你把 base64(我用 base64 试过)字符串分成多个部分,每个部分都是一个序列.然后下面是 API 调用 seq:
You break the base64 (I tried with base64) string into multiple parts, each part is a sequence. Then below are the API calls seq:
-
创建块上传
-POST/v2/accounts/{accountId}/chunked_uploads
,这将返回chunkedUploadId
和chunkedUploadUri
.chunkedUploadId
将被使用对于更多与 chunkupload 相关的调用,例如更新更多流块或用于提交块上传.chunkedUploadUri
将是用于在创建信封调用中添加文档,它将被引用在文档"节点内的 remoteUrl 中.
-
Create ChunkUpload
-POST /v2/accounts/{accountId}/chunked_uploads
, this returns thechunkedUploadId
andchunkedUploadUri
.chunkedUploadId
will be used for more chunkupload related calls, like update more stream on the chunk or for committing the chunkupload.chunkedUploadUri
will be used to add document in the create envelope call, it will be referred in remoteUrl inside "document" node.
响应如下:
{
"chunkedUploadId": "C4AE9DF7-E3E4-4F3F-B419-29F59647D860",
"chunkedUploadUri": "docusignchunkedupload://C4AE9DF7-E3E4-4F3F-B419-29F59647D860",
...
}
-
然后
PUT/v2/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/{chunkedUploadPartSeq}
需要调用来上传 base64 的剩余部分文档(字符串的其他部分).序列会增加像1,2,3 等-
Then
PUT /v2/accounts/{accountId}/chunked_uploads/{chunkedUploadId}/{chunkedUploadPartSeq}
call is required to uploaded remaining part of the the base64 document (other part of the string). Sequence will increase like 1,2,3 etc最后
Chunk Commit
调用,PUT/v2/accounts/{accountId}/chunked_uploads/{chunkedUploadId}
使此块可用于创建信封调用一旦所有添加了一个文档块.Finally
Chunk Commit
call,PUT /v2/accounts/{accountId}/chunked_uploads/{chunkedUploadId}
to make this Chunk available to be used in create envelope call once all the chunk of a document is added.在
Create Envelope
调用中,你会参考下面的chunkIn
Create envelope
call, you will refer to chunk as belowEnvelope Definition's document will look like below "documents": [{ "remoteUrl": "docusignchunkedupload://C4AE9DF7-E3E4-4F3F-B419-29F59647D860", "documentId": "1", "name": "Test"
}
`remoteUrl` is the `chunkedUploadUri` returned in the first call.
-