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:
parent
6035e74f88
commit
c26e8a04db
1 changed files with 8 additions and 0 deletions
|
@ -80,6 +80,14 @@ module Fog
|
|||
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 = {})
|
||||
requires :directory
|
||||
data = connection.head_object(directory.key, key)
|
||||
|
|
Loading…
Reference in a new issue