Package registry: downloading files from UI doesn't respect filenames
🔥 Problem
When browsing the Package Registry UI, we can get the details of a package with the related files. Clicking on a file will download it.
Historically, the browser would open a download file prompt and the package filename would be used as the default value for the name for the file.
It seems that this doesn't work anymore. Example: https://gitlab.com/issue-reproduce/packages/maven/maven-package/-/packages/14601208, clicking on any file will use download
as a filename.
What is strange is that locally, the backend properly use the package filename.
To be complete here, this part has been updated recently with Resolve "Packaging: Support directory structure" (!141361 - merged) where support for directly like filenames (such as foo/bar/file.txt
) has been added. This is mainly for the Generic package registry but the changes impacted the UI part too which is used by any supported package format.
🚨 Workaround
- No known workaround to download the package file with the correct name at this point.
- The downloaded file itself is fine. User can rename the file with the correct extension manually.
🚒 Solution
- There has to be something with the
#send_upload
function here.- This could be a configuration that is different between gitlab.com and the local instance.
- Investigate and find a solution to guarantee that the filename sent is the one from the package file.
Ref
Internal only ZD ticket ref: 530713, 530797, 530855, 530885, 530992