1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #923 from cyrez/rs_storage_file_copy

[rackspace|storage|file] copy method now use the options hash and apply content-type
This commit is contained in:
Wesley Beary 2012-05-23 14:37:43 -07:00
commit 3e24a47710

View file

@ -31,7 +31,8 @@ module Fog
def copy(target_directory_key, target_file_key, options={})
requires :directory, :key
connection.copy_object(directory.key, key, target_directory_key, target_file_key)
options['Content-Type'] ||= content_type if content_type
connection.copy_object(directory.key, key, target_directory_key, target_file_key, options)
target_directory = connection.directories.new(:key => target_directory_key)
target_directory.files.get(target_file_key)
end