mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
[FIX]组织可以不上传头像
This commit is contained in:
@@ -57,7 +57,8 @@ class Organizations::OrganizationsController < Organizations::BaseController
|
||||
|
||||
private
|
||||
def convert_image!
|
||||
max_size = EduSetting.get('upload_avatar_max_size') || 2 * 1024 * 1024 # 2M
|
||||
return unless params[:image].present?
|
||||
max_size = EduSetting.get('upload_avatar_max_size').to_i || 2 * 1024 * 1024 # 2M
|
||||
if params[:image].class == ActionDispatch::Http::UploadedFile
|
||||
@image = params[:image]
|
||||
render_error('请上传文件') if @image.size.zero?
|
||||
|
||||
Reference in New Issue
Block a user