-
Type:
Bug
-
Resolution: Done
-
Priority:
Unknown
-
Affects Version/s: 5.1.0
-
Component/s: Reactive Streams, Scala
-
None
-
None
-
Java Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Summary
When uploading a file with gridFSBucket.uploadFromObservable, a blob id you want to insert data with is not honored when using a session.
That said, the following works (record in files created with bsonBlobId provided:
gridFSBucket.uploadFromObservable(bsonBlobId, fileName.getOrElse(""), observableToUploadFrom, options).headResult()
this doesn't work in terms data still uploaded, files & chunks populated but not with bsonBlobId : gridFSBucket.uploadFromObservable(session, bsonBlobId, fileName.getOrElse(""), observableToUploadFrom, options).headResult()
Scala 2.13.14 / Scala driver 5.1.0 & 5.2.0, Single node replica set 6.0
I adapted MongoDb Scala example how to upload file to GridFS. Just modified to accept 'blobId' & for the 2nd case 'blobId' & 'session', see attached.
Thanks for looking into it.