refactor(api): signAndPackReport 直接返回签名 ZIP 文件
This commit is contained in:
@@ -74,7 +74,7 @@ OpenAPI 中已按 `tags` 分组:
|
||||
|
||||
- 文件类型:`application/zip` 或 `application/x-zip-compressed`
|
||||
- 其他业务字段(如 `deviceId`、`taskId`)与文件一起提交
|
||||
- 接口响应为 JSON,其中 `signedZipBase64` 为签名后 ZIP 的 Base64 编码
|
||||
- 接口响应为签名后 ZIP 文件(`application/zip`)
|
||||
|
||||
示例(curl):
|
||||
|
||||
@@ -85,13 +85,8 @@ curl -X POST "http://localhost:3000/api/crypto/sign-and-pack-report" \
|
||||
-F "enterpriseId=1173040813421105152" \
|
||||
-F "inspectionId=702286470691215417" \
|
||||
-F "summary=检查摘要信息" \
|
||||
-F "rawZip=@./report-raw.zip;type=application/zip"
|
||||
```
|
||||
|
||||
响应中的 `signedZipBase64` 可按以下方式还原为 ZIP:
|
||||
|
||||
```bash
|
||||
# jq -r '.signedZipBase64' response.json | base64 -d > signed-report.zip
|
||||
-F "rawZip=@./report-raw.zip;type=application/zip" \
|
||||
--output signed-report.zip
|
||||
```
|
||||
|
||||
## 6. 推荐接入方式
|
||||
|
||||
Reference in New Issue
Block a user