data_export/user: remove rescue since local image handling works now for sure

This commit is contained in:
Georg Gadinger 2022-12-21 10:56:52 +00:00 committed by Andreas Nedbal
parent 312fadff2a
commit 9895782a02
1 changed files with 1 additions and 6 deletions

View File

@ -68,12 +68,7 @@ module UseCase
picture.versions.each do |version, file|
export_filename = "pictures/#{file.mounted_as}_#{version}_#{file.filename}"
to[export_filename] = if file.url.start_with?("/")
begin
Rails.public_path.join(file.url.sub(%r{\A/+}, "")).read
rescue
# TODO: fix image handling in local development environments!!! see #822
"ceci n'est pas un image\n"
end
Rails.public_path.join(file.url.sub(%r{\A/+}, "")).read
else
HTTParty.get(file.url).parsed_response
end