default not found image
This commit is contained in:
@@ -10,11 +10,12 @@ class BlobsController < ApplicationController
|
||||
end
|
||||
|
||||
def contents
|
||||
thumb = params[:thumb]
|
||||
raise("invalid thumb #{thumb}") if !thumb.blank? && !thumb_params(thumb)
|
||||
|
||||
expires_dur = 1.year
|
||||
response.headers["Expires"] = expires_dur.from_now.httpdate
|
||||
expires_in expires_dur, public: true
|
||||
thumb = params[:thumb]
|
||||
raise("invalid thumb #{thumb}") if !thumb.blank? && !thumb_params(thumb)
|
||||
|
||||
sha256 = params[:id]
|
||||
etag = sha256
|
||||
|
||||
@@ -9,6 +9,9 @@ module Domain::Fa::UsersHelper
|
||||
elsif (path = user.avatar&.guess_file_uri_from_hles)
|
||||
path
|
||||
end
|
||||
rescue
|
||||
# default / 'not found' avatar image
|
||||
"/blobs/9080fd4e7e23920eb2dccfe2d86903fc3e748eebb2e5aa8c657bbf6f3d941cdc/contents.jpg"
|
||||
end
|
||||
|
||||
def sanitized_fa_user_profile_html(html)
|
||||
|
||||
Reference in New Issue
Block a user