Skip to content

Commit 1a3b9e3

Browse files
nhhmp911de
authored andcommitted
DATAMONGO-2021 - Use getObjectId() instead of getFilename() for opening the GridFS download stream.
Using the file name leads to duplicate resource streams as file names are not unique therefore we're using the file's ObjectId to lookup the file content. Original pull request: #581.
1 parent 5a37468 commit 1a3b9e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/gridfs/GridFsTemplate.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
/**
4646
* {@link GridFsOperations} implementation to store content into MongoDB GridFS.
47-
*
47+
*
4848
* @author Oliver Gierke
4949
* @author Philipp Schneider
5050
* @author Thomas Darimont
@@ -62,7 +62,7 @@ public class GridFsTemplate implements GridFsOperations, ResourcePatternResolver
6262

6363
/**
6464
* Creates a new {@link GridFsTemplate} using the given {@link MongoDbFactory} and {@link MongoConverter}.
65-
*
65+
*
6666
* @param dbFactory must not be {@literal null}.
6767
* @param converter must not be {@literal null}.
6868
*/
@@ -72,7 +72,7 @@ public GridFsTemplate(MongoDbFactory dbFactory, MongoConverter converter) {
7272

7373
/**
7474
* Creates a new {@link GridFsTemplate} using the given {@link MongoDbFactory} and {@link MongoConverter}.
75-
*
75+
*
7676
* @param dbFactory must not be {@literal null}.
7777
* @param converter must not be {@literal null}.
7878
* @param bucket

0 commit comments

Comments
 (0)