mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Be sure to read the file into string before base64
Follow up to: 08b4753843
If you don't use `read` base64 will error out with: "no implicit
conversion of Tempfile into String"
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user