Skip to content
Snippets Groups Projects
Verified Commit 7001ad2d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Add files encoding support on context level

parent 1d497a12
No related branches found
No related tags found
Loading
Loading
@@ -33,7 +33,8 @@ module Files
Loading
@@ -33,7 +33,8 @@ module Files
new_file_action = Gitlab::Satellite::NewFileAction.new(current_user, project, ref, file_path) new_file_action = Gitlab::Satellite::NewFileAction.new(current_user, project, ref, file_path)
created_successfully = new_file_action.commit!( created_successfully = new_file_action.commit!(
params[:content], params[:content],
params[:commit_message] params[:commit_message],
params[:encoding]
) )
   
if created_successfully if created_successfully
Loading
Loading
Loading
@@ -23,10 +23,11 @@ module Files
Loading
@@ -23,10 +23,11 @@ module Files
return error("You can only edit text files") return error("You can only edit text files")
end end
   
new_file_action = Gitlab::Satellite::EditFileAction.new(current_user, project, ref, path) edit_file_action = Gitlab::Satellite::EditFileAction.new(current_user, project, ref, path)
created_successfully = new_file_action.commit!( created_successfully = edit_file_action.commit!(
params[:content], params[:content],
params[:commit_message] params[:commit_message],
params[:encooding]
) )
   
if created_successfully if created_successfully
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment