0

实际上,我正在尝试在特定问题上将文档上传到 Clio。但是,当我将文档标记为已完全上传时,我遇到了错误。以下是详细信息

邮政:

https://app.clio.com/api/v4/documents?fields=id%2Clatest_document_version%7Buuid%2Cput_url%2Cput_headers%7D
Body: 
{"data":
    {"name":"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]}}

当我通过邮递员(不同的文件)尝试它时,我在同一事件中收到以下消息:

{
    "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"
    }
}

你能告诉我我做错了什么吗?

4

1 回答 1

0

实际上,为了实用地将文档上传到 Clio,我错过了一个步骤。它需要调用三个 Rest API

  1. POST:创建文档
  2. PUT:上传文件
  3. 补丁:将文档标记为完全上传的 ​​API 所以这里我错过了第二步。调用第二个 API 后,它对我有用
于 2020-09-08T09:35:49.750 回答