Commit ab55e75a authored by Shinya Maeda's avatar Shinya Maeda

Use send_data for sending raw trace

parent 68dc30fc
......@@ -119,25 +119,10 @@ class Projects::JobsController < Projects::ApplicationController
end
def raw
if trace_artifact
send_upload(trace_artifact.file,
send_params:
{
type: 'text/plain; charset=utf-8',
disposition: 'inline'
},
redirect_params:
{
query: { "response-content-disposition" => "inline" }
} )
if build.trace.exist?
send_data build.trace.raw, type: 'text/plain; charset=utf-8', :disposition => 'inline'
else
build.trace.read do |stream|
if stream.file?
send_file stream.path, type: 'text/plain; charset=utf-8', disposition: 'inline'
else
render_404
end
end
render_404
end
end
......
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