Skip to content

Commit 9456056

Browse files
ali-abdi-takktAli Abdi
andauthored
Upon putting an object into the S3 bucket (for instance, while copying), 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>
1 parent 4b5db92 commit 9456056

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/software/amazon/nio/spi/s3/S3WritableByteChannel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public void close() throws IOException {
108108
.putObjectRequest(PutObjectRequest.builder()
109109
.bucket(path.bucketName())
110110
.key(path.getKey())
111+
.contentType(Files.probeContentType(tempFile))
111112
.build())
112113
.source(tempFile)
113114
.build()

0 commit comments

Comments
 (0)