Skip to content

Commit f93e05d

Browse files
johnbintzTylerBrock
authored andcommitted
use collection#save instead of collection#insert to save gridio chunks so that replacement chunks overwrite existing ones
1 parent 1454210 commit f93e05d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongo/gridfs/grid_io.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def create_chunk(n)
275275
end
276276

277277
def save_chunk(chunk)
278-
@chunks.insert(chunk)
278+
@chunks.save(chunk)
279279
end
280280

281281
def get_chunk(n)

0 commit comments

Comments
 (0)