Skip to content

Commit 78142bc

Browse files
author
Will Banfield
committed
quick fix to an oopsie
1 parent ae82012 commit 78142bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/GridFS/GridFsUpload.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public function insertChunks($toWrite)
121121
$readBytes += strlen($addToBuffer);
122122
$this->bufferLength += strlen($addToBuffer);
123123
if($this->bufferLength == $this->chunkSizeBytes) {
124+
rewind($this->buffer);
124125
$this->insertChunk(fread($this->buffer, $this->chunkSizeBytes));
125126
ftruncate($this->buffer,0);
126127
$this->bufferLength = 0;

0 commit comments

Comments
 (0)