public final class GridFSUploadOptions extends Object
Constructor | Description |
---|---|
GridFSUploadOptionsβ() |
Construct a new instance.
|
Modifier and Type | Method | 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
|
@Nullable public Integer getChunkSizeBytesβ()
If no value has been set then, the chunkSizeBytes from the GridFSBucket will be used.
public GridFSUploadOptions chunkSizeBytesβ(@Nullable Integer chunkSizeBytes)
chunkSizeBytes
- the number of bytes per chunk for the uploaded file@Nullable public Document getMetadataβ()
public GridFSUploadOptions metadataβ(@Nullable Document metadata)
metadata
- the metadata to be stored