【发布时间】:2023-03-20 11:00:01
【问题描述】:
我正在尝试使用放心框架上传文件。该调用是对我正在使用的 API 的 POST 调用,代码如下:
given()
.contentType("image/jpg")
.accept("application/json")
.auth().oauth2(accessToken, OAuthSignature.QUERY_STRING)
.multiPart(new File("C:/Snap0000.jpg"))
.post("/objects/files")
.getBody();
我这样做时得到的错误是:
400 - Unable to read image info Couldn't read magic numbers to guess format.
我做错了什么?
【问题讨论】:
-
有什么帮助吗????
-
你好misra,上传图片文件,你有什么解决办法吗?请分享你的答案
标签: rest-assured