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:
parent
08b4753843
commit
fe01099a38
|
@ -114,7 +114,7 @@ after_initialize do
|
||||||
max_file_size: SiteSetting.max_image_size_kb.kilobytes,
|
max_file_size: SiteSetting.max_image_size_kb.kilobytes,
|
||||||
tmp_file_name: 'narrative-bot-avatar',
|
tmp_file_name: 'narrative-bot-avatar',
|
||||||
follow_redirect: true
|
follow_redirect: true
|
||||||
)
|
).read
|
||||||
rescue OpenURI::HTTPError
|
rescue OpenURI::HTTPError
|
||||||
# Ignore if fetching image returns a non 200 response
|
# Ignore if fetching image returns a non 200 response
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue