Skip to content

Commit

Permalink
Upon putting an object into the S3 bucket (for instance, while copyin…
Browse files Browse the repository at this point in the history
…g), we need to also provide the content-type of the file. This could come crucial in cases like when the uploaded file (let's say an XML file) is going to be used by a specific application later. (#204)

Co-authored-by: Ali Abdi <ali.abdi@kaiserkraft-europa.de>
  • Loading branch information
aliabdikk and Ali Abdi authored Oct 4, 2023
1 parent 4b5db92 commit 9456056
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public void close() throws IOException {
.putObjectRequest(PutObjectRequest.builder()
.bucket(path.bucketName())
.key(path.getKey())
.contentType(Files.probeContentType(tempFile))
.build())
.source(tempFile)
.build()
Expand Down

0 comments on commit 9456056

Please sign in to comment.