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

Add helper method to get cdn ssl url for the files collection.

This commit is contained in:
Rupak Ganguly 2012-04-17 17:02:39 -04:00
parent 6035e74f88
commit c26e8a04db

View file

@ -80,6 +80,14 @@ module Fog
end end
end end
def get_cdn_ssl_url(key)
requires :directory
if self.directory.cdn_public_ssl_url
# escape the key to cover for special char. in object names
"#{self.directory.cdn_public_ssl_url}/#{Fog::HP.escape(key)}"
end
end
def head(key, options = {}) def head(key, options = {})
requires :directory requires :directory
data = connection.head_object(directory.key, key) data = connection.head_object(directory.key, key)