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