|
|
|
@ -10,7 +10,7 @@ class AvatarController < ApplicationController
|
|
|
|
|
unless request.content_type == 'application/octet-stream'
|
|
|
|
|
@source_type = params[:source_type]
|
|
|
|
|
@source_id = params[:source_id]
|
|
|
|
|
@temp_file = params[:avatar][:image]
|
|
|
|
|
@temp_file = params[:avatar][:image]
|
|
|
|
|
@image_file = @temp_file.original_filename
|
|
|
|
|
else
|
|
|
|
|
unless request.raw_post.nil?
|
|
|
|
@ -23,7 +23,7 @@ class AvatarController < ApplicationController
|
|
|
|
|
#image_file.force_encoding("UTF-8") if filename.respond_to?(:force_encoding)
|
|
|
|
|
else
|
|
|
|
|
@image_file=params[:filename]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
@temp_file = StringIO.new(@temp_file)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|