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