Skip to content

A platform for community discussion. Free, open, simple.

DEV: Be sure to read the file into string before base64

Blake Ericksonfe01099a38f7
diff --git a/plugins/discourse-narrative-bot/plugin.rb b/plugins/discourse-narrative-bot/plugin.rb
index e3e6afea78a..31949915f4b 100644
--- a/plugins/discourse-narrative-bot/plugin.rb
+++ b/plugins/discourse-narrative-bot/plugin.rb
@@ -114,7 +114,7 @@ after_initialize do
max_file_size: SiteSetting.max_image_size_kb.kilobytes,
tmp_file_name: 'narrative-bot-avatar',
follow_redirect: true
- )
+ ).read
rescue OpenURI::HTTPError
# Ignore if fetching image returns a non 200 response
end