FIX: Return blank avatar when downloading an avatar is not possible due to file size

This commit is contained in:
romanrizzi 2019-10-22 12:05:36 -03:00
parent e112369bb6
commit a411806551
1 changed files with 3 additions and 0 deletions

View File

@ -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