We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1985503 commit c91cac5Copy full SHA for c91cac5
src/main/java/com/berry/storage/ObjectManage.java
@@ -88,7 +88,7 @@ public ObjectInfoVo upload(String bucket, String acl, @Nullable String filePath,
88
String url = String.format("%s%s", config.getAddress(), UrlFactory.ObjectUrl.create.getUrl());
89
90
StringMap header = auth.authorization(url);
91
- Response response = HttpClient.multipartPost(url, fields, "file", "demo.png", file, Constants.MULTIPART_MIME, header);
+ Response response = HttpClient.multipartPost(url, fields, "file", file.getName(), file, Constants.MULTIPART_MIME, header);
92
Result result = response.jsonToObject(Result.class);
93
if (result.getCode().equals(Constants.API_SUCCESS_CODE) && result.getMsg().equals(Constants.API_SUCCESS_MSG)) {
94
return Json.decode(Json.encode(result.getData()), ObjectInfoVo.class);
0 commit comments