Merge pull request #91 from MongoHQ/duplicate_filename
Passing :filename to GridFS stored duplicate filename attributes
This commit is contained in:
commit
fb0b0f1234
|
@ -68,7 +68,7 @@ module Mongo
|
|||
# @return [BSON::ObjectId] the file's id.
|
||||
def put(data, opts={})
|
||||
opts = opts.dup
|
||||
filename = opts[:filename]
|
||||
filename = opts.delete(:filename)
|
||||
opts.merge!(default_grid_io_opts)
|
||||
file = GridIO.new(@files, @chunks, filename, 'w', opts)
|
||||
file.write(data)
|
||||
|
|
Loading…
Reference in New Issue