This commit is contained in:
huang 2016-01-08 22:29:57 +08:00
parent 8c10ce6fee
commit c719fd96a3
1 changed files with 2 additions and 2 deletions

View File

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