Fetch/store Web App metadata and icons, finish RS integration #153

Merged
raucao merged 39 commits from feature/142-webapp_database into master 2024-01-01 13:18:48 +00:00
Showing only changes of commit bec827acb1 - Show all commits

View File

@ -35,10 +35,11 @@ module AppCatalogManager
def attach_remote_image(attachment_name, icon)
download_url = "#{@app.url}/#{icon["src"].gsub(/^\//,'')}"
filename = "web_apps/#{@app.id}/icons/#{attachment_name}.png"
filename = "#{attachment_name}.png"
key = "web_apps/#{@app.id}/icons/#{attachment_name}.png"
tempfile = Down.download(download_url)
@app.send(attachment_name).attach(io: tempfile, filename: filename)
@app.send(attachment_name).attach(key: key, io: tempfile, filename: filename)
end
end
end