diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-03-28 22:05:27 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-04-01 21:17:40 +0300 |
commit | 8c5b3d030210cc2659107ec2633a496165470125 (patch) | |
tree | 54e1a98cb3c747715e5047de5051ced536740328 /app | |
parent | 57cba4d1e9e9964359a5c55bca6558db0d511d98 (diff) |
Allow streaming io objects into Gitaly
This allows us to set the encoding of an IO passed without reading it
into memory.
This is useful if we want to stream files into Gitaly. Like we do when
uploading a new file to the repository.
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 909b17e9c8d..7e072788fc9 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -172,8 +172,7 @@ class Projects::BlobController < Projects::ApplicationController end if params[:file].present? - params[:content] = Base64.encode64(params[:file].read) - params[:encoding] = 'base64' + params[:content] = params[:file] end @commit_params = { |