简体   繁体   English

docusign api下载的文档名称

[英]Document Names for docusign api downloads

I am using the code below to download documents in an envelope with DocuSign api 我正在使用下面的代码通过DocuSign api下载信封中的文档

Is there a way to get the documents email address? 有没有办法获取文件的电子邮件地址? I can use documentID but that is not a very good filename Does anyone have suggestions on how to get descriptive filenames when downloading? 我可以使用documentID,但这不是一个很好的文件名。有人在下载时有关于如何获取描述性文件名的建议吗?

MemoryStream docStream = (MemoryStream)envelopesApi.GetDocument(accountId,envelopeId, docsList.EnvelopeDocuments[i].DocumentId);

filePath = "C:\\JohnFolder\\DocuSign\\DownLoads\\" + docsList.EnvelopeDocuments[i].Name + ".pdf";



fs = new FileStream(filePath, FileMode.Create);
docStream.Seek(0, SeekOrigin.Begin);
docStream.CopyTo(fs);
fs.Close();
Console.WriteLine("Envelope Document {0} has been downloaded to:  {1}", i, filePath);

Check the Content-Disposition property in the response header, it has fileName. 检查响应头中的Content-Disposition属性,它具有fileName。

Header in response will look like below: 响应的标题如下所示:

Content-Disposition →file; filename="GettingStarted"; documentid="1"

It has fileName in the Content-Disposition value. 它在Content-Disposition值中具有fileName。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM