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