# File lib/dragonfly/data_storage/file_data_store.rb, line 17 def store(temp_object, opts={}) relative_path = if opts[:path] opts[:path] else filename = temp_object.name || 'file' relative_path = relative_path_for(filename) end begin path = absolute(relative_path) until !File.exist?(path) path = disambiguate(path) end temp_object.to_file(path).close store_meta_data(path, temp_object.meta) if store_meta rescue Errno::EACCES => e raise UnableToStore, e.message end relative(path) end