huang 10 years ago
parent 8c10ce6fee
commit c719fd96a3

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

Loading…
Cancel
Save