Skip to content

Commit c91cac5

Browse files
author
berry_cooper
committed
update object manage
1 parent 1985503 commit c91cac5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/berry/storage/ObjectManage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public ObjectInfoVo upload(String bucket, String acl, @Nullable String filePath,
8888
String url = String.format("%s%s", config.getAddress(), UrlFactory.ObjectUrl.create.getUrl());
8989

9090
StringMap header = auth.authorization(url);
91-
Response response = HttpClient.multipartPost(url, fields, "file", "demo.png", file, Constants.MULTIPART_MIME, header);
91+
Response response = HttpClient.multipartPost(url, fields, "file", file.getName(), file, Constants.MULTIPART_MIME, header);
9292
Result result = response.jsonToObject(Result.class);
9393
if (result.getCode().equals(Constants.API_SUCCESS_CODE) && result.getMsg().equals(Constants.API_SUCCESS_MSG)) {
9494
return Json.decode(Json.encode(result.getData()), ObjectInfoVo.class);

0 commit comments

Comments
 (0)