We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84d04e3 commit 66e8546Copy full SHA for 66e8546
lib/mongo/grid/stream/write.rb
@@ -82,9 +82,8 @@ def initialize(fs, options)
82
def write(io)
83
ensure_open!
84
@indexes ||= ensure_indexes!
85
- data = io.read
86
- @length += data.length
87
- chunks = File::Chunk.split(data, file_info, @n)
+ @length += io.size
+ chunks = File::Chunk.split(io, file_info, @n)
88
@n += chunks.size
89
chunks_collection.insert_many(chunks) unless chunks.empty?
90
self
0 commit comments