mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Return blank avatar when downloading an avatar is not possible due to file size
This commit is contained in:
parent
e112369bb6
commit
a411806551
@ -160,6 +160,9 @@ class UserAvatarsController < ApplicationController
|
|||||||
follow_redirect: true,
|
follow_redirect: true,
|
||||||
read_timeout: 10
|
read_timeout: 10
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return render_blank if tmp.nil?
|
||||||
|
|
||||||
FileUtils.mv tmp.path, path
|
FileUtils.mv tmp.path, path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user