Fixed issue when sending a :filename GridFS would store the :filename attribute twice.
This commit is contained in:
parent
c802c7eba3
commit
0f46875473
@ -68,7 +68,7 @@ module Mongo
|
|||||||
# @return [BSON::ObjectId] the file's id.
|
# @return [BSON::ObjectId] the file's id.
|
||||||
def put(data, opts={})
|
def put(data, opts={})
|
||||||
opts = opts.dup
|
opts = opts.dup
|
||||||
filename = opts[:filename]
|
filename = opts.delete(:filename)
|
||||||
opts.merge!(default_grid_io_opts)
|
opts.merge!(default_grid_io_opts)
|
||||||
file = GridIO.new(@files, @chunks, filename, 'w', opts)
|
file = GridIO.new(@files, @chunks, filename, 'w', opts)
|
||||||
file.write(data)
|
file.write(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user