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:
commit
3e24a47710
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue