From 94337d333124ba1ca57405e2508e88d3b8f90e32 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 7 Jan 2020 14:33:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0?= 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 f9c9550d9..0b429f98f 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -897,7 +897,8 @@ class ShixunsController < ApplicationController author_email = current_user.git_mail message = params[:message] || "upload file by browser" uid_logger("-----author_email: #{author_email}") - update_file_base64_content(content, @repo_path, @path, author_email, author_name, message) + path = @path.present? ? "#{@path}/#{upload_file.original_filename}" : "#{upload_file.original_filename}" + update_file_base64_content(content, @repo_path, path, author_email, author_name, message) render_ok end