Merge pull request #91 from MongoHQ/duplicate_filename

Passing :filename to GridFS stored duplicate filename attributes
This commit is contained in:
Tyler Brock 2012-02-28 07:34:23 -08:00
commit fb0b0f1234
1 changed files with 1 additions and 1 deletions

View File

@ -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)