课程的logo在更新时会出现不显示的情况,显示的是一个文本的?

This commit is contained in:
cxt 2017-03-10 15:39:05 +08:00
parent d0e73c12ff
commit d5472f667b
1 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,10 @@ class AvatarController < ApplicationController
end end
@temp_file = nil @temp_file = nil
while !File.exist?(diskfile)
sleep(0.5)
end
respond_to do |format| respond_to do |format|
format.json{ format.json{
render :inline => {status: @status, message:@msg, url:"#{@urlfile.to_s}?#{Time.now.to_i}"}.to_json,:content_type => 'text/html' render :inline => {status: @status, message:@msg, url:"#{@urlfile.to_s}?#{Time.now.to_i}"}.to_json,:content_type => 'text/html'