zamoroka / module-webapi-documents
Magento 2 模块:使用 REST API 处理文档
0.1.2
2020-05-07 14:53 UTC
Requires
- php: ~7.1.3||~7.2.0||~7.3.0
- magento/framework: ^102.0.3
Requires (Dev)
- magento/magento-coding-standard: ^5.0
- squizlabs/php_codesniffer: ^3.5.0
This package is auto-updated.
Last update: 2024-09-29 05:48:48 UTC
README
使用curl上传PDF
curl --location --request POST '<host>/rest/V1/webapidocuments/upload' \
--header 'Authorization: Bearer <bearer token>' \
--header 'Content-Type: multipart/form-data; boundary=----something' \
--form 'filename=@<directory>/<filename>.pdf'
使用HTTP请求上传PDF
POST /rest/V1/webapidocuments/upload HTTP/1.1
Host: <host>
Authorization: Bearer <bearer token>
Content-Type: multipart/form-data; boundary=----something
----something
Content-Disposition: form-data; name="filename"; filename="<filename>.pdf"
Content-Type: application/pdf
(data)
----something