Skip to content

Commit

Permalink
[fix] #98 return url as intended form
Browse files Browse the repository at this point in the history
  • Loading branch information
tkdwns414 committed Jun 7, 2024
1 parent 7e1edc2 commit a66b041
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public String uploadImage(String directoryPath, MultipartFile image) throws IOEx

RequestBody requestBody = RequestBody.fromBytes(image.getBytes());
s3Client.putObject(request, requestBody);
return key;
return s3Client.utilities().getUrl(builder -> builder.bucket(bucketName).key(key)).toExternalForm();
}

public void deleteImage(String key) throws IOException {
Expand Down

0 comments on commit a66b041

Please sign in to comment.