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:
parent
9ac2ba02ac
commit
7402e8b04b
2 changed files with 6 additions and 6 deletions
|
@ -49,10 +49,8 @@ module Fog
|
|||
end
|
||||
|
||||
def public_url
|
||||
requires :directory, :key
|
||||
if @directory.public_url
|
||||
"#{@directory.public_url}/#{key}"
|
||||
end
|
||||
requires :key
|
||||
self.collection.get_url(self.key)
|
||||
end
|
||||
|
||||
def save(options = {})
|
||||
|
|
|
@ -64,9 +64,11 @@ module Fog
|
|||
nil
|
||||
end
|
||||
|
||||
def get_url(key, expires)
|
||||
def get_url(key)
|
||||
requires :directory
|
||||
connection.get_object_url(directory.key, key, expires)
|
||||
if self.directory.public_url
|
||||
"#{self.directory.public_url}/#{key}"
|
||||
end
|
||||
end
|
||||
|
||||
def head(key, options = {})
|
||||
|
|
Loading…
Reference in a new issue