Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-03 00:09:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-03 00:09:03 +0300
commit03cd2a56f32310def67fefdc34797833a5daf770 (patch)
tree1cefc8769ffc7752183cab6dd9974e259295324d /lib/api/helpers.rb
parent983f6954d19f269a059aab1754568737d9ab6f64 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 99f759b50d2..75e7612bd5b 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -592,19 +592,19 @@ module API
end
end
- def present_artifacts_file!(file, project:, **args)
+ def present_artifacts_file!(file, **args)
log_artifacts_filesize(file&.model)
- present_carrierwave_file!(file, project: project, **args)
+ present_carrierwave_file!(file, **args)
end
- def present_carrierwave_file!(file, project: nil, supports_direct_download: true)
+ def present_carrierwave_file!(file, supports_direct_download: true)
return not_found! unless file&.exists?
if file.file_storage?
present_disk_file!(file.path, file.filename)
elsif supports_direct_download && file.class.direct_download_enabled?
- redirect(cdn_fronted_url(file, project))
+ redirect(cdn_fronted_url(file))
else
header(*Gitlab::Workhorse.send_url(file.url))
status :ok
@@ -612,9 +612,9 @@ module API
end
end
- def cdn_fronted_url(file, project)
+ def cdn_fronted_url(file)
if file.respond_to?(:cdn_enabled_url)
- result = file.cdn_enabled_url(project, ip_address)
+ result = file.cdn_enabled_url(ip_address)
Gitlab::ApplicationContext.push(artifact_used_cdn: result.used_cdn)
result.url
else