From 8836be0717922173c7ab7b3d395d9519d4d09df1 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 6 Jan 2020 20:45:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BC=96=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 7009726d8..4e749ab0d 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -888,9 +888,10 @@ class ShixunsController < ApplicationController def upload_git_file upload_file = params["file"] - uid_logger("#########################file_params####{params["#{params[:file]}"]}") + uid_logger("#########################file_params##: #{params["file"]}") raise "未上传文件" unless upload_file content = upload_file.tempfile.read + uid_logger("#########################content####{content}") author_name = current_user.real_name author_email = current_user.git_mail message = params[:message] || "upload file by browser" From 37bbeee28ebe1dfce22764047af9f97794caad71 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 7 Jan 2020 09:11:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 4e749ab0d..35aee9ffa 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -895,6 +895,7 @@ class ShixunsController < ApplicationController author_name = current_user.real_name author_email = current_user.git_mail message = params[:message] || "upload file by browser" + uid_logger("-----author_email: #{author_email}") update_file_content(content, @repo_path, @path, author_email, author_name, message) render_ok end