mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #3166 from KieranP/patch-1
Allow get_object_https_url to accept a method
This commit is contained in:
commit
1c96d0cabd
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ module Fog
|
||||||
# * container<~String> - Name of container containing object
|
# * container<~String> - Name of container containing object
|
||||||
# * object<~String> - Name of object to get expiring url for
|
# * object<~String> - Name of object to get expiring url for
|
||||||
# * expires<~Time> - An expiry time for this url
|
# * expires<~Time> - An expiry time for this url
|
||||||
|
# * options<~Hash> - Options to override the method or scheme
|
||||||
#
|
#
|
||||||
# ==== Returns
|
# ==== Returns
|
||||||
# * response<~Excon::Response>:
|
# * response<~Excon::Response>:
|
||||||
|
@ -23,7 +24,7 @@ module Fog
|
||||||
raise ArgumentError, "Storage must my instantiated with the :rackspace_temp_url_key option"
|
raise ArgumentError, "Storage must my instantiated with the :rackspace_temp_url_key option"
|
||||||
end
|
end
|
||||||
|
|
||||||
method = 'GET'
|
method = options[:method] || 'GET'
|
||||||
expires = expires.to_i
|
expires = expires.to_i
|
||||||
object_path_escaped = "#{@uri.path}/#{Fog::Rackspace.escape(container)}/#{Fog::Rackspace.escape(object,"/")}"
|
object_path_escaped = "#{@uri.path}/#{Fog::Rackspace.escape(container)}/#{Fog::Rackspace.escape(object,"/")}"
|
||||||
object_path_unescaped = "#{@uri.path}/#{Fog::Rackspace.escape(container)}/#{object}"
|
object_path_unescaped = "#{@uri.path}/#{Fog::Rackspace.escape(container)}/#{object}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue