Add response-content-disposition to url in Workhorse.send_url

Context

Previously, we fixed Generic Package Registry: downloading files fro... (#465102 - closed). However, Users reported that the bug still presents when downloading generic packages from the project release page.

After investigation, it turned out that we don't pass the response-content-disposition query param in the file URL that sent to Gitlab::Workhorse.send_url.

What does this MR do?

  • Add the response-content-disposition query param to the file URL that passed to Gitlab::Workhorse.send_url. Same as we do here.
  • Add related specs.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Add proxy_download: true setting to your GDK's config > gitlab.yml > {} production > {} packages > {} object_store and restart the GDK.
  2. Follow those steps to publish a release with a generic package and download it with the correct name.

Related to #492354 (closed)

Edited by Moaz Khalifa

Merge request reports

Loading