* Returns a writable stream (GridFSBucketWriteStream) for writing * buffers to GridFS for a custom file id. The stream's 'id' property contains the resulting * file's id.
(
id: ObjectId,
filename: string,
options?: GridFSBucketWriteStreamOptions
)
| 129 | * file's id. |
| 130 | */ |
| 131 | openUploadStreamWithId( |
| 132 | id: ObjectId, |
| 133 | filename: string, |
| 134 | options?: GridFSBucketWriteStreamOptions |
| 135 | ): GridFSBucketWriteStream { |
| 136 | return new GridFSBucketWriteStream(this, filename, { |
| 137 | timeoutMS: this.s.options.timeoutMS, |
| 138 | ...options, |
| 139 | id |
| 140 | }); |
| 141 | } |
| 142 | |
| 143 | /** Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS. */ |
| 144 | openDownloadStream( |
no outgoing calls