Always initialize @metadata and @aliases
This commit is contained in:
parent
62900acb4b
commit
d12987bf7a
|
@ -335,8 +335,8 @@ module Mongo
|
||||||
@files_id = opts.delete(:_id) || BSON::ObjectId.new
|
@files_id = opts.delete(:_id) || BSON::ObjectId.new
|
||||||
@content_type = opts.delete(:content_type) || (defined? MIME) && get_content_type || DEFAULT_CONTENT_TYPE
|
@content_type = opts.delete(:content_type) || (defined? MIME) && get_content_type || DEFAULT_CONTENT_TYPE
|
||||||
@chunk_size = opts.delete(:chunk_size) || DEFAULT_CHUNK_SIZE
|
@chunk_size = opts.delete(:chunk_size) || DEFAULT_CHUNK_SIZE
|
||||||
@metadata = opts.delete(:metadata) if opts[:metadata]
|
@metadata = opts.delete(:metadata)
|
||||||
@aliases = opts.delete(:aliases) if opts[:aliases]
|
@aliases = opts.delete(:aliases)
|
||||||
@file_length = 0
|
@file_length = 0
|
||||||
opts.each {|k, v| self[k] = v}
|
opts.each {|k, v| self[k] = v}
|
||||||
check_existing_file if @safe
|
check_existing_file if @safe
|
||||||
|
|
Loading…
Reference in New Issue