Only complete icon URLs when given relative or absolute paths
This commit is contained in:
parent
e964e7e52c
commit
261a782963
@ -34,7 +34,11 @@ module AppCatalogManager
|
||||
end
|
||||
|
||||
def attach_remote_image(attachment_name, icon)
|
||||
download_url = "#{@app.url}/#{icon["src"].gsub(/^\//,'')}"
|
||||
if icon['src'].start_with?("http")
|
||||
download_url = icon['src']
|
||||
else
|
||||
download_url = "#{@app.url}/#{icon["src"].gsub(/^\//,'')}"
|
||||
end
|
||||
filename = "#{attachment_name}.png"
|
||||
key = "web_apps/#{@app.id}/icons/#{attachment_name}.png"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user