Method UploadFromBytes
UploadFromBytes(string, byte[], GridFSUploadOptions, CancellationToken)
Uploads a file (or a new revision of a file) to GridFS.
ObjectId UploadFromBytes(string filename, byte[] source, GridFSUploadOptions options = null, CancellationToken cancellationToken = default)
Parameters
filename
stringThe filename.
source
byte[]The source.
options
GridFSUpload Options The options.
cancellationToken
CancellationToken The cancellation token.
Returns
- Object
Id The id of the new file.