Commit 7c49f3ea authored by Shinya Maeda's avatar Shinya Maeda

Revert "Use send_data for sending raw trace"

This reverts commit 0acbd89805dd1bb4728857d6da88070cd782040f.
parent ab55e75a
......@@ -119,10 +119,25 @@ class Projects::JobsController < Projects::ApplicationController
end
def raw
if build.trace.exist?
send_data build.trace.raw, type: 'text/plain; charset=utf-8', :disposition => 'inline'
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" }
} )
else
render_404
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
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