0

我正在尝试使用登录报告门户添加屏幕截图,但尝试这样做时收到错误消息。

{
    "responses": [
        {"message": "ReportPortalException: Binary data cannot be saved. There is no request part or file with name screenshot",

包含帖子详细信息的请求有效负载。附上邮递员的截图描述了表单数据的细节

[
{"file": {
"name": "screenshot",
"contentType" : "image/jpeg"
},
"item_id": "5dca6e8fb9d8210001df81df",
"level": "Log info",
"message": "Result=Failed",
"time": "2019-10-23T21:27:33.280Z"}
]

邮递员图片

屏幕截图应附上登录报告门户

4

1 回答 1

0

请注意,ReportPortal 希望您发送多部分请求,其中第一部分是 json 正文,第二部分是文件本身。此外,二进制部分的文件名应在 json 部分中指定。在这里你可以找到一些细节。 https://reportportal.io/docs/Logging-Integration%3Emultipart-logging-request-example

在您的示例中,您将“json_request_part”作为 json 文件发送,该文件不是 ReportPortal 期望看到的 json 正文(不是文件)

看起来从最新版本开始 Postman 确实支持这个: Tool for send multipart/form-data request

于 2019-11-18T14:35:19.880 回答