v0.15.5 Minor fix

This commit is contained in:
David Sainty 2024-06-26 21:35:00 +10:00
parent 5e82e5e3d1
commit 2e9268d993

View File

@ -1,5 +1,5 @@
# gossamer threads migration-import code
# v0.15.4
# v0.15.5
require 'mysql2'
require 'open-uri'
@ -187,6 +187,7 @@ class GossamerForumsImporter < ImportScripts::Base
# Helper method to download an attachment / image from a URL
def download_attachment(url)
begin
puts "URL: '#{url}'"
URI.open(url).read
rescue OpenURI::HTTPError => e
puts "Failed to download attachment from #{url}: #{e.message}"