mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 01:47:46 +08:00
FIX: Return blank avatar when downloading an avatar is not possible due to file size
This commit is contained in:
@ -160,6 +160,9 @@ class UserAvatarsController < ApplicationController
|
||||
follow_redirect: true,
|
||||
read_timeout: 10
|
||||
)
|
||||
|
||||
return render_blank if tmp.nil?
|
||||
|
||||
FileUtils.mv tmp.path, path
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user