Skip to content

Commit b123a9b

Browse files
committed
Merge commit '982a65997325fb894dd004a3f85e562d7a64123a'
2 parents 78a2bdd + 982a659 commit b123a9b

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ repositories {
3535
//----------------------------------------------------------------
3636

3737
// The Project version
38-
version = '4.1.0'
38+
version = '4.1.3'
3939

4040
// Setup java compilation version
4141
sourceCompatibility = 1.8

src/main/java/picoded/dstack/mongodb/MongoDB_FileWorkspaceMap.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,15 @@ public byte[] backend_fileRead(String oid, String filepath) {
677677
**/
678678
public InputStream backend_fileReadInputStream(String oid, String filepath) {
679679
try {
680-
return gridFSBucket.openDownloadStream(oid + "/" + filepath);
680+
681+
// id of the file to download
682+
return gridFSBucket.openDownloadStream(
683+
// name of the file to download
684+
oid + "/" + filepath,
685+
// set the revision number to -1 to download the latest copy of the file
686+
new GridFSDownloadOptions().revision(-1)
687+
);
688+
681689
} catch (Exception e) {
682690
if (e.getMessage().toLowerCase().indexOf("no file found") >= 0) {
683691
// Does nothing if no file is found

0 commit comments

Comments
 (0)