可选writePlaces this write stream into an aborted state (all future writes fail) and deletes all chunks that have already been written.
Tells the stream that no more data will be coming in. The stream will persist the remaining data to MongoDB, write the files document, and then emit a 'finish' event.
Tells the stream that no more data will be coming in. The stream will persist the remaining data to MongoDB, write the files document, and then emit a 'finish' event.
Buffer to write
Tells the stream that no more data will be coming in. The stream will persist the remaining data to MongoDB, write the files document, and then emit a 'finish' event.
Function to call when all files and chunks have been persisted to MongoDB
Tells the stream that no more data will be coming in. The stream will persist the remaining data to MongoDB, write the files document, and then emit a 'finish' event.
Buffer to write
Function to call when all files and chunks have been persisted to MongoDB
Tells the stream that no more data will be coming in. The stream will persist the remaining data to MongoDB, write the files document, and then emit a 'finish' event.
Buffer to write
Optional encoding for the buffer
Tells the stream that no more data will be coming in. The stream will persist the remaining data to MongoDB, write the files document, and then emit a 'finish' event.
Buffer to write
Optional encoding for the buffer
Function to call when all files and chunks have been persisted to MongoDB
Write a buffer to the stream.
Buffer to write
False if this write required flushing a chunk to MongoDB. True otherwise.
Write a buffer to the stream.
Buffer to write
Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush.
False if this write required flushing a chunk to MongoDB. True otherwise.
Write a buffer to the stream.
Buffer to write
False if this write required flushing a chunk to MongoDB. True otherwise.
Write a buffer to the stream.
Buffer to write
Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush.
False if this write required flushing a chunk to MongoDB. True otherwise.
A writable stream that enables you to write buffers to GridFS.
Do not instantiate this class directly. Use
openUploadStream()instead.