Skip to content

Commit df76d5f

Browse files
committed
Prepare version 1.0.1.
1 parent 3685deb commit df76d5f

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to
66
[Semantic Versioning](http://semver.org/).
77

8+
## [1.0.1] - 2017-09-14
9+
* Fix stream not closed after calling `S3DocumentStore.createFromUploadedFile(...)`.
10+
811
## [1.0.0] - 2017-09-14
912

1013
* Initial release.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add the following dependency to you `pom.xml` file.
1616
<dependency>
1717
<groupId>org.gomoob</groupId>
1818
<artifactId>aws-s3</artifactId>
19-
<version>1.0</version>
19+
<version>1.0.1</version>
2020
</dependency>
2121
```
2222

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<modelVersion>4.0.0</modelVersion>
3737
<groupId>org.gomoob</groupId>
3838
<artifactId>aws-s3</artifactId>
39-
<version>1.0.0</version>
39+
<version>1.0.1</version>
4040
<packaging>jar</packaging>
4141
<name>Gomoob Java Amazon Web Services S3 library</name>
4242
<description>The Gomoob Java Amazon Web Services S3 library contains utility class to work with the Amazon S3 Java SDK.</description>

src/main/java/com/gomoob/aws/s3/documentstore/S3DocumentStore.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ public void createFromUploadedFile(final String serverFilePath, final String key
8383

8484
// Puts the file on Amazon S3
8585
PutObjectRequest putObjectRequest = PutObjectRequest.builder().bucket(this.bucket).key(prefixedKeyName).build();
86-
this.s3.putObject(putObjectRequest, RequestBody.of(file));
86+
87+
RequestBody requestBody = RequestBody.of(file);
88+
this.s3.putObject(putObjectRequest, requestBody);
89+
requestBody.asStream().close();
8790

8891
}
8992

0 commit comments

Comments
 (0)