头像上传代码还原

This commit is contained in:
cxt 2017-03-15 14:47:54 +08:00
parent a1509088e4
commit 3b4b069348
2 changed files with 1 additions and 3 deletions

View File

@ -80,7 +80,7 @@ class AvatarController < ApplicationController
# sleep(0.5)
# end
@src_file = diskfile
#@src_file = diskfile
respond_to do |format|
format.json{

View File

@ -1,7 +1,5 @@
<% if @is_direct == '1' && (@source_type=='User'|| @source_type == 'Course' || @source_type == 'Project' || @source_type == 'Organization'|| @source_type == 'Contest') %>
var imgSpan = $("img[nhname='avatar_image']");
<% sleep(1) %>
<% logger.info("###############################################################get_img") %>
imgSpan.attr({"src":'<%= "#{@urlfile.to_s}?#{Time.now.to_i}" %>'});
<% else %>
var imgSpan = jQuery('#avatar_image');