mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Escape source object name when copying
This commit is contained in:
parent
49febbcf83
commit
a484870331
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ module Fog
|
||||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html
|
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html
|
||||||
|
|
||||||
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
|
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
|
||||||
headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{source_object_name}" }.merge!(options)
|
headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{CGI.escape(source_object_name)}" }.merge!(options)
|
||||||
request({
|
request({
|
||||||
:expects => 200,
|
:expects => 200,
|
||||||
:headers => headers,
|
:headers => headers,
|
||||||
|
|
Loading…
Reference in a new issue