fixed sendfile

This commit is contained in:
xxq250 2026-07-24 11:29:24 +08:00
parent 08b5b3a33b
commit 900a397a68
1 changed files with 1 additions and 2 deletions

View File

@ -238,8 +238,7 @@ class UsersController < ApplicationController
def get_image
return render_not_found unless @user = User.find_by(login: params[:id]) || User.find_by_id(params[:id])
# return render_forbidden unless User.current.logged? && (current_user&.admin? || current_user.id == @user.id)
redirect_to Rails.application.config_for(:configuration)['platform_url'] + "/" + url_to_avatar(@user).to_s
send_file("public/#{url_to_avatar(@user).to_s}" , :type => 'application/octet-stream;charset=utf-8')
end
def me