Commit c8e41f90 by LI Daobing

get works

parent 33b797a0
...@@ -100,15 +100,10 @@ module Paperclip ...@@ -100,15 +100,10 @@ module Paperclip
end end
def public_url(style = default_style) def public_url(style = default_style)
if @options[:fog_host] init
"#{dynamic_fog_host_for_style(style)}/#{path(style)}" res = ::Qiniu::RS.get(bucket, path(style))
else return res["url"] if res
if fog_credentials[:provider] == 'AWS' nil
"https://#{host_name_for_directory}/#{path(style)}"
else
directory.files.new(:key => path(style)).public_url
end
end
end end
def expiring_url(time = 3600, style = default_style) def expiring_url(time = 3600, style = default_style)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment