We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12ff51f commit 983571bCopy full SHA for 983571b
1 file changed
src/gridfs/upload.ts
@@ -455,7 +455,7 @@ function doWrite(
455
spaceRemaining -= numToCopy;
456
let doc: GridFSChunk;
457
if (spaceRemaining === 0) {
458
- doc = createChunkDoc(stream.id, stream.n, stream.bufToStore);
+ doc = createChunkDoc(stream.id, stream.n, new Uint8Array(stream.bufToStore));
459
460
const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;
461
if (remainingTimeMS != null && remainingTimeMS <= 0) {
0 commit comments