|
|
|
@ -888,12 +888,14 @@ 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"
|
|
|
|
|
uid_logger("-----author_email: #{author_email}")
|
|
|
|
|
update_file_content(content, @repo_path, @path, author_email, author_name, message)
|
|
|
|
|
render_ok
|
|
|
|
|
end
|
|
|
|
|