|
|
|
@ -893,7 +893,8 @@ class ShixunsController < ApplicationController
|
|
|
|
|
content = upload_file.tempfile.read
|
|
|
|
|
author_name = current_user.real_name
|
|
|
|
|
author_email = current_user.git_mail
|
|
|
|
|
update_file_content(content, @repo_path, @path, author_email, author_name, "upload file by browser")
|
|
|
|
|
message = params[:message] || "upload file by browser"
|
|
|
|
|
update_file_content(content, @repo_path, @path, author_email, author_name, message)
|
|
|
|
|
render_ok
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -901,14 +902,16 @@ class ShixunsController < ApplicationController
|
|
|
|
|
def upload_git_folder
|
|
|
|
|
author_name = current_user.real_name
|
|
|
|
|
author_email = current_user.git_mail
|
|
|
|
|
git_add_folder(@path, author_name, author_email, "upload folder by browser")
|
|
|
|
|
message = params[:message] || "upload folder by browser"
|
|
|
|
|
git_add_folder(@path, author_name, author_email, message)
|
|
|
|
|
render_ok
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def delete_git_file
|
|
|
|
|
author_name = current_user.real_name
|
|
|
|
|
author_email = current_user.git_mail
|
|
|
|
|
git_delete_file(@path, author_name, author_email, "delete filer by browser")
|
|
|
|
|
message = params[:message] || "delete file by browser"
|
|
|
|
|
git_delete_file(@path, author_name, author_email, message)
|
|
|
|
|
render_ok
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|