我正在尝试使用放心的框架上传文件。该调用是对我正在使用的 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.
我究竟做错了什么?