Commit ab55e75a authored by Shinya Maeda's avatar Shinya Maeda

Use send_data for sending raw trace

parent 68dc30fc
...@@ -119,27 +119,12 @@ class Projects::JobsController < Projects::ApplicationController ...@@ -119,27 +119,12 @@ class Projects::JobsController < Projects::ApplicationController
end end
def raw def raw
if trace_artifact if build.trace.exist?
send_upload(trace_artifact.file, send_data build.trace.raw, type: 'text/plain; charset=utf-8', :disposition => 'inline'
send_params:
{
type: 'text/plain; charset=utf-8',
disposition: 'inline'
},
redirect_params:
{
query: { "response-content-disposition" => "inline" }
} )
else
build.trace.read do |stream|
if stream.file?
send_file stream.path, type: 'text/plain; charset=utf-8', disposition: 'inline'
else else
render_404 render_404
end end
end end
end
end
private private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment