【发布时间】:2020-02-13 01:27:41
【问题描述】:
我正在使用以下端点向信封添加附件:
PUT /v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments
显然请求进展顺利,因为我得到了这个回报:
"attachments" => array:2 [
0 => array:4 [
"attachmentId" => "656A658D-AD83-438C-B58D-86738486349C"
"attachmentType" => "png"
"name" => "asdas"
"accessControl" => "SenderAndAllRecipients"
]
]
但是视图上的签名者什么都看不到。签名者可以在哪里下载或可视化通过 api 添加的附件?
更新
发送附件的方法:
public function addAttachments($saleContract, $envelopeId)
{
$attachments = array();
foreach ($saleContract->document as $document){
array_push($attachments, [
'accessControl' => 'senderAndAllRecipients',
'attachmentId' => $document->id,
'attachmentType' => \File::extension($document->storage_file_name),
'data' => base64_encode(Storage::disk('sienge')->get($document->storage_file_name)),
'name' => $document->file_name,
]);
}
Docusign::addEnvelopeAttachments($envelopeId, $attachments);
}
【问题讨论】:
标签: laravel docusignapi