实际上,我正试图上传一个文件到clio在一个特定的问题。但我在将文档标记为完全上载时出错。下面是细节
职位:
https://app.clio.com/api/v4/documents?fields=id%2Clatest_document_version%7Buuid%2Cput_url%2Cput_headers%7D
Body:
{"data":
{"name":"https:\/\/dev.leafletcorp.com:8991\/bl\/\/temp\/1599311387193_1\/Sahi Clio Test pppppppppp.zip",
"parent":
{"id":1235381254,"type":"Matter"}
}
}
Response:
{"data":{"id":2817422494,"latest_document_version":{"uuid":"f59e8f14-42fc-4ecb-889c-587dc3e75c23","put_url":"https://iris-production.s3.us-east-1.amazonaws.com/uploads/document_version/file/f59e8f14-42fc-4ecb-889c-587dc3e75c23/http%3A//dev.brightleaf.com%3A8991/bl//temp/1599305767133_1/Sahi%20Clio%20Test%20887445.zip?X-Amz-Expires=28800&X-Amz-Date=20200905T113156Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3TF4DC3BD47PIMP5/20200905/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=content-type%3Bhost%3Bx-amz-server-side-encryption&X-Amz-Signature=cf0f07b59b085eb45e2eb042f1f7737277c516bb8f2894cba731414c348e6243","put_headers":[{"name":"x-amz-server-side-encryption","value":"AES256"},{"name":"Content-Type","value":"application/zip"}]}}}
补丁
https://app.clio.com/api/v4/documents?fields=id%2Clatest_document_version%7Buuid%2Cput_url%2Cput_headers%7D&fields=id%2Clatest_document_version%7Bfully_uploaded%7D
Body:
{"data":{"uuid":"f59e8f14-42fc-4ecb-889c-587dc3e75c23","fully_uploaded":"true"}}
Response:
HttpResponseProxy{HTTP/1.1 422 Unprocessable Entity [Cache-Control: private, no-cache, no-store, must-revalidate, Content-Type: application/json; charset=utf-8, Date: Sat, 05 Sep 2020 11:51:55 GMT, Server: nginx, Status: 422 Unprocessable Entity, Vary: Origin, X-API-VERSION: 4.0.5, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, X-RateLimit-Limit: 600, X-RateLimit-Remaining: 598, X-RateLimit-Reset: 1599306720, X-Request-Id: ad411eb3-fd05-4824-917c-9fe2246d8a31, X-XSS-Protection: 1; mode=block, Content-Length: 234, Connection: keep-alive] ResponseEntityProxy{[Content-Type: application/json; charset=utf-8,Content-Length: 234,Chunked: false]}}
当我试着通过 Postman (不同的文件),我得到以下消息对同一事件:
{
"error": {
"type": "UploadNotFoundError",
"message": "A matching remote file was not found for the file named C:/Users/srrepswal/Desktop/Sahi Clio Test pppppppppp.zip with UUID f65a8b4e-4aa9-4855-a088-0d3e63bad18b"
}
}
你能告诉我我做错了什么吗?
1条答案
按热度按时间e3bfsja21#
实际上,为了实用地将文档上传到clio,我少了一步。它需要调用三个restapi
发布:创建文档
put:上载文档
修补程序:将文档标记为完全上载的api,因此我错过了第二步。在调用第二个api之后,它对我起作用了