MCPcopy
hub / github.com/mongodb/node-mongodb-native / openUploadStream

Method openUploadStream

src/gridfs/index.ts:116–124  ·  view source on GitHub ↗

* Returns a writable stream (GridFSBucketWriteStream) for writing * buffers to GridFS. The stream's 'id' property contains the resulting * file's id. * * @param filename - The value of the 'filename' key in the files doc * @param options - Optional settings.

(
    filename: string,
    options?: GridFSBucketWriteStreamOptions
  )

Source from the content-addressed store, hash-verified

114 */
115
116 openUploadStream(
117 filename: string,
118 options?: GridFSBucketWriteStreamOptions
119 ): GridFSBucketWriteStream {
120 return new GridFSBucketWriteStream(this, filename, {
121 timeoutMS: this.s.options.timeoutMS,
122 ...options
123 });
124 }
125
126 /**
127 * Returns a writable stream (GridFSBucketWriteStream) for writing

Callers 9

testFunction · 0.95
operations.tsFile · 0.80
gridfs.test.tsFile · 0.80
node_csot.test.tsFile · 0.80
gridTestFunction · 0.80
main.test.tsFile · 0.80

Calls

no outgoing calls

Tested by 1

testFunction · 0.76