NULL PDF 异常

2021年十一月2日
更新 2024年十月20日
分享:
This article was translated from English: Does it need improvement?
Translated
View the article in English

"ERROR-001"错误发生在没有提供PDF文件时。 这意味着POST请求中必需的pdf_file参数为空或者为null。

请注意
请务必检查参数语法、PDF 文件的文件路径或 PDF 流的有效性。

推荐解决方案

提示
确保在POST请求中将pdf_file参数设置为您的PDF文件。

在 cURL 中 pdf_file 正确语法的示例:

curl -X POST 'https://api.securedoc.com/v1/document-services/pdfs/redact-text?words_to_redact=IRON' \
  -H 'accept: */*' \
  -H 'Content-Type: multipart/form-data' \
  -F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'
CURL

请参考最后一行以正确使用:

-F 'pdf_file=@YOUR_PDF_DOCUMENT.pdf;type=application/pdf'