diff --git a/app/controllers/avatar_controller.rb b/app/controllers/avatar_controller.rb index 0cf2014e4..7497e4573 100644 --- a/app/controllers/avatar_controller.rb +++ b/app/controllers/avatar_controller.rb @@ -53,6 +53,13 @@ class AvatarController < ApplicationController # @avatar.source_id = User.current.id # @avatar.image_file = params[:filename].presence || Redmine::Utils.random_hex(16) # saved = @avatar.save + begin + f= Magick::ImageList.new(diskfile) + f.scale!(50,50) + f.write(diskfile) + rescue + end + respond_to do |format| format.js