Skip to content
Snippets Groups Projects
Commit e01c421b authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Prefer if so it's more clear what's going on

parent 1c7871e9
Branches
Tags
1 merge request!5142Add a download buttons for Build Artifacts
Pipeline #
Loading
@@ -69,16 +69,17 @@ module API
Loading
@@ -69,16 +69,17 @@ module API
authorize_read_builds! authorize_read_builds!
   
build = get_build!(params[:build_id]) build = get_build!(params[:build_id])
artifacts_file = build.artifacts_file artifacts_file = build.artifacts_file
   
unless artifacts_file.file_storage? if !artifacts_file.file_storage?
return redirect_to build.artifacts_file.url redirect_to(build.artifacts_file.url)
end
return not_found! unless artifacts_file.exists?
   
elsif artifacts_file.exists?
present_file!(artifacts_file.path, artifacts_file.filename) present_file!(artifacts_file.path, artifacts_file.filename)
else
not_found!
end
end end
   
# Get a trace of a specific build of a project # Get a trace of a specific build of a project
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment