public final class GridFSUploadOptions extends Object
Constructor and Description |
---|
GridFSUploadOptions()
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
GridFSUploadOptions |
chunkSizeBytes(Integer chunkSizeBytes)
Sets the chunk size in bytes.
|
Integer |
getChunkSizeBytes()
The number of bytes per chunk of this file.
|
Document |
getMetadata()
Returns any user provided data for the 'metadata' field of the files collection document.
|
GridFSUploadOptions |
metadata(Document metadata)
Sets metadata to stored alongside the filename in the files collection
|
public Integer getChunkSizeBytes()
If no value has been set then, the chunkSizeBytes from the GridFSBucket will be used.
public GridFSUploadOptions chunkSizeBytes(Integer chunkSizeBytes)
chunkSizeBytes
- the number of bytes per chunk for the uploaded filepublic Document getMetadata()
public GridFSUploadOptions metadata(Document metadata)
metadata
- the metadata to be stored