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

[storage|rackspace] fix files#get_url

This commit is contained in:
geemus 2011-06-10 10:53:20 -07:00
parent 9ac2ba02ac
commit 7402e8b04b
2 changed files with 6 additions and 6 deletions

View file

@ -49,10 +49,8 @@ module Fog
end end
def public_url def public_url
requires :directory, :key requires :key
if @directory.public_url self.collection.get_url(self.key)
"#{@directory.public_url}/#{key}"
end
end end
def save(options = {}) def save(options = {})

View file

@ -64,9 +64,11 @@ module Fog
nil nil
end end
def get_url(key, expires) def get_url(key)
requires :directory requires :directory
connection.get_object_url(directory.key, key, expires) if self.directory.public_url
"#{self.directory.public_url}/#{key}"
end
end end
def head(key, options = {}) def head(key, options = {})