The bucket name.
The bucket name.
the bucket name
Sets the chunk size in bytes.
Sets the chunk size in bytes. Defaults to 255.
the chunk size in bytes.
Given a id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.
Given a id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.
the client session with which to associate this operation
the ObjectId of the file to be deleted
an empty Observable that indicates when the operation has completed
2.2
Requires MongoDB 3.6 or greater
Given a id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.
Given a id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.
the client session with which to associate this operation
the ObjectId of the file to be deleted
an empty Observable that indicates when the operation has completed
2.2
Requires MongoDB 3.6 or greater
Given a id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.
Given a id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.
the ObjectId of the file to be deleted
an empty Observable that indicates when the operation has completed
Given a id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.
Given a id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.
the ObjectId of the file to be deleted
an empty Observable that indicates when the operation has completed
Downloads the contents of the stored file specified by filename
and by the revision in options
into the
Publisher
.
Downloads the contents of the stored file specified by filename
and by the revision in options
into the
Publisher
.
the client session with which to associate this operation
the name of the file to be downloaded
the download options
an Observable with a single element, representing the amount of data written
2.8
Requires MongoDB 3.6 or greater
Downloads the contents of the latest version of the stored file specified by filename
into the Publisher
.
Downloads the contents of the latest version of the stored file specified by filename
into the Publisher
.
the client session with which to associate this operation
the name of the file to be downloaded
an Observable with a single element, representing the amount of data written
2.8
Requires MongoDB 3.6 or greater
Downloads the contents of the stored file specified by id
into the Publisher
.
Downloads the contents of the stored file specified by id
into the Publisher
.
the client session with which to associate this operation
the custom id of the file, to be written to the destination stream
an Observable with a single element, representing the amount of data written
2.8
Requires MongoDB 3.6 or greater
Downloads the contents of the stored file specified by id
into the Publisher
.
Downloads the contents of the stored file specified by id
into the Publisher
.
the client session with which to associate this operation
the ObjectId of the file to be written to the destination stream
an Observable with a single element, representing the amount of data written
2.8
Requires MongoDB 3.6 or greater
Downloads the contents of the stored file specified by filename
and by the revision in options
into the
Publisher
.
Downloads the contents of the stored file specified by filename
and by the revision in options
into the
Publisher
.
the name of the file to be downloaded
the download options
an Observable with a single element, representing the amount of data written
2.8
Downloads the contents of the stored file specified by filename
into the Publisher
.
Downloads the contents of the stored file specified by filename
into the Publisher
.
the name of the file to be downloaded
an Observable with a single element, representing the amount of data written
2.8
Downloads the contents of the stored file specified by id
into the Publisher
.
Downloads the contents of the stored file specified by id
into the Publisher
.
the custom id of the file, to be written to the destination stream
an Observable with a single element, representing the amount of data written
2.8
Downloads the contents of the stored file specified by id
into the Publisher
.
Downloads the contents of the stored file specified by id
into the Publisher
.
the ObjectId of the file to be written to the destination stream
an Observable with a single element, representing the amount of data written
2.8
Drops the data associated with this bucket from the database.
Drops the data associated with this bucket from the database.
the client session with which to associate this operation
an empty Observable that indicates when the operation has completed
2.2
Requires MongoDB 3.6 or greater
Drops the data associated with this bucket from the database.
Drops the data associated with this bucket from the database.
an empty Observable that indicates when the operation has completed
Finds all documents in the collection that match the filter.
Finds all documents in the collection that match the filter.
Below is an example of filtering against the filename and some nested metadata that can also be stored along with the file data:
Filters.and(Filters.eq("filename", "mongodb.png"), Filters.eq("metadata.contentType", "image/png"));
the client session with which to associate this operation
the query filter
the GridFS find iterable interface
2.2
Requires MongoDB 3.6 or greater
com.mongodb.client.model.Filters
Finds all documents in the files collection.
Finds all documents in the files collection.
the client session with which to associate this operation
the GridFS find iterable interface
2.2
Requires MongoDB 3.6 or greater
Finds all documents in the collection that match the filter.
Finds all documents in the collection that match the filter.
Below is an example of filtering against the filename and some nested metadata that can also be stored along with the file data:
Filters.and(Filters.eq("filename", "mongodb.png"), Filters.eq("metadata.contentType", "image/png"));
the query filter
the GridFS find iterable interface
com.mongodb.client.model.Filters
Finds all documents in the files collection.
Get the read concern for the GridFSBucket.
Get the read concern for the GridFSBucket.
the ReadConcern
Requires MongoDB 3.2 or greater
Get the read preference for the GridFSBucket.
Get the read preference for the GridFSBucket.
the ReadPreference
Renames the stored file with the specified id
.
Renames the stored file with the specified id
.
the client session with which to associate this operation
the id of the file in the files collection to rename
the new filename for the file
an empty Observable that indicates when the operation has completed
2.2
Requires MongoDB 3.6 or greater
Renames the stored file with the specified id
.
Renames the stored file with the specified id
.
the client session with which to associate this operation
the id of the file in the files collection to rename
the new filename for the file
an empty Observable that indicates when the operation has completed
2.2
Requires MongoDB 3.6 or greater
Renames the stored file with the specified id
.
Renames the stored file with the specified id
.
the id of the file in the files collection to rename
the new filename for the file
an empty Observable that indicates when the operation has completed
Renames the stored file with the specified id
.
Renames the stored file with the specified id
.
the id of the file in the files collection to rename
the new filename for the file
an empty Observable that indicates when the operation has completed
Uploads the contents of the given Observable
to a GridFS bucket.
Uploads the contents of the given Observable
to a GridFS bucket.
Reads the contents of the user file from the source
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
the client session with which to associate this operation
the custom id value of the file
the filename for the stream
the Publisher providing the file data
the GridFSUploadOptions
an Observable with a single element, representing when the successful upload of the source.
2.8
Requires MongoDB 3.6 or greater
Uploads the contents of the given Observable
to a GridFS bucket.
Uploads the contents of the given Observable
to a GridFS bucket.
Reads the contents of the user file from the source
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
the client session with which to associate this operation
the custom id value of the file
the filename for the stream
the Publisher providing the file data
an Observable with a single element, representing when the successful upload of the source.
2.8
Requires MongoDB 3.6 or greater
Uploads the contents of the given Observable
to a GridFS bucket.
Uploads the contents of the given Observable
to a GridFS bucket.
Reads the contents of the user file from the source
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
the client session with which to associate this operation
the filename for the stream
the Publisher providing the file data
the GridFSUploadOptions
an Observable with a single element, the ObjectId of the uploaded file.
2.8
Requires MongoDB 3.6 or greater
Uploads the contents of the given Observable
to a GridFS bucket.
Uploads the contents of the given Observable
to a GridFS bucket.
Reads the contents of the user file from the source
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
the client session with which to associate this operation
the filename for the stream
the Publisher providing the file data
an Observable with a single element, the ObjectId of the uploaded file.
2.8
Requires MongoDB 3.6 or greater
Uploads the contents of the given Observable
to a GridFS bucket.
Uploads the contents of the given Observable
to a GridFS bucket.
Reads the contents of the user file from the source
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
the custom id value of the file
the filename for the stream
the Publisher providing the file data
the GridFSUploadOptions
an Observable with a single element, representing when the successful upload of the source.
2.8
Uploads the contents of the given Observable
to a GridFS bucket.
Uploads the contents of the given Observable
to a GridFS bucket.
Reads the contents of the user file from the source
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
the custom id value of the file
the filename for the stream
the Publisher providing the file data
an Observable with a single element, representing when the successful upload of the source.
2.8
Uploads the contents of the given Observable
to a GridFS bucket.
Uploads the contents of the given Observable
to a GridFS bucket.
Reads the contents of the user file from the source
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
the filename for the stream
the Publisher providing the file data
the GridFSUploadOptions
an Observable with a single element, the ObjectId of the uploaded file.
2.8
Uploads the contents of the given Observable
to a GridFS bucket.
Uploads the contents of the given Observable
to a GridFS bucket.
Reads the contents of the user file from the source
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
the filename for the stream
the Publisher providing the file data
an Observable with a single element, the ObjectId of the uploaded file.
2.8
Create a new GridFSBucket instance with a new chunk size in bytes.
Create a new GridFSBucket instance with a new chunk size in bytes.
the new chunk size in bytes.
a new GridFSBucket instance with the different chunk size in bytes
Create a new MongoDatabase instance with a different read concern.
Create a new MongoDatabase instance with a different read concern.
the new ReadConcern for the database
a new GridFSBucket instance with the different ReadConcern
Requires MongoDB 3.2 or greater
Create a new GridFSBucket instance with a different read preference.
Create a new GridFSBucket instance with a different read preference.
the new ReadPreference for the database
a new GridFSBucket instance with the different readPreference
Create a new GridFSBucket instance with a different write concern.
Create a new GridFSBucket instance with a different write concern.
the new WriteConcern for the database
a new GridFSBucket instance with the different writeConcern
Get the write concern for the GridFSBucket.
Get the write concern for the GridFSBucket.
the WriteConcern
(Since version ) see corresponding Javadoc for more information.
Represents a GridFS Bucket
1.2