简体   繁体   English

是否可以将文档发送到DocuSign API而无需将其完全加载到内存中?

[英]Is it possible to send documents to the DocuSign API without loading them entirely into memory?

All the examples I saw showing how to build up a DocuSign envelope (using Java in my case) use a Base64 encoded String to send the file(s) content. 我看到的所有示例都展示了如何构建DocuSign信封(在我的例子中使用Java)使用Base64编码的字符串来发送文件内容。

That means loading the entire file into memory. 这意味着将整个文件加载到内存中。

Is there a way to send files to the DocuSign API without loading them entirely into memory? 有没有办法将文件发送到DocuSign API而不将它们完全加载到内存中?

Document document = new Document();
document.setDocumentBase64(docBase64);
...

An excellent question. 一个很好的问题。

Is there a way to send files to the DocuSign API without loading them entirely into memory? 有没有办法将文件发送到DocuSign API而不将它们完全加载到内存中?

Yes. 是。 You can send the documents in binary form by sending the API request using the multi-part mime format. 您可以使用多部分mime格式发送API请求,以二进制形式发送文档。 The SDKs don't support this currently, so you will also need to hand-roll the JSON. SDK目前不支持此功能,因此您还需要手动滚动JSON。 But none of this is very hard. 但这一切都不是很难。

We have examples for all of our major languages . 我们有所有主要语言的示例 They are workflow number 10 within each of the eg-03 code example repositories on github.com/docusign 它们是github.com/docusign上每个eg-03代码示例存储库中的工作流编号10

Here is workflow number 10 for Java: EG010ControllerSendBinaryDocs.java 以下是Java的工作流编号10: EG010ControllerSendBinaryDocs.java

Welcome to SOF. 欢迎来到SOF。

An alternative to Larry's solution, depending on the use-case, you could create a template in DocuSign and then in your API call just refer to the pre-existing template and fill in the tabs and send it. 作为Larry解决方案的替代方案,根据用例,您可以在DocuSign中创建模板,然后在API调用中只需参考预先存在的模板并填写选项卡并发送。 This way there will be no need to use the base64 code. 这样就不需要使用base64代码了。 However, in some cases, when there is no static template this might not work. 但是,在某些情况下,当没有静态模板时,这可能不起作用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用docusign Api将任何格式的文件发送到Docusign - How to Send file of any format to Docusign using docusign Api 是否可以在不使用 xml 的情况下完全用 Java 制作 android 键盘 - Is it possible to make an android keyboard entirely out of Java without using xml Docusign 识别复选框,但无法通过 API 与它们交互 - Docusign recognizes checkboxes, but can't interact with them through the API 将两个Excel工作表合并到一个Excel工作簿中,而不将其加载到内存中 - Merging two excel sheets in to One Excel work book without loading them in to memory 如何处理大型ResultSet中的数据而不将其全部加载到内存中? - How to process data from large ResultSet without loading them all to memory? 遍历hazelcast数据结构的所有元素(例如IMap),而无需立即将它们加载到内存中 - Iterate over all elements of a hazelcast datastructure (for example IMap) without loading them into memory at once 如何在 Java 中的已排序大文本文件中找到差异(基于行)而不将它们全部加载到 memory 中? - How to find difference (line-based) in sorted large text files in Java without loading them in full into memory? 在Docusign中对文档进行嵌入式签名 - Embedded signing with documents in Docusign 是否可以通过Java API检索Docusign模板或Power Form字段 - Is it possible to retrieve Docusign Templates or Power Form fields through Java API Elasticsearch Java API - 如何在不检索文档的情况下获取文档数量 - Elasticsearch Java API - How to get the number of documents without retrieving the documents
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM