头像上传时等待三秒(确保文件上传完成)

This commit is contained in:
cxt 2017-03-17 16:35:23 +08:00
parent dfaab07455
commit b87ac32bd5
1 changed files with 3 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class AvatarController < ApplicationController
end
if @source_type == 'Contest'
Trustie::Utils::Image.new(diskfile,true).compress(600)
Trustie::Utils::Image.new(diskfile,true).compress(900)
else
Trustie::Utils::Image.new(diskfile,true).compress(300)
end
@ -79,6 +79,8 @@ class AvatarController < ApplicationController
end
@temp_file = nil
sleep(3)
# while !File.readable?(diskfile)
# logger.info("###############################################################sleep")
# sleep(0.5)