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