Chrome adds nested path to file download name
Summary
Chrome adds nested path to file download name
Steps to reproduce
Open this example image in both Firefox and Chrome and save using the download button.
Firefox will save the file correctly, whereas Chrome will prepend the path, i.e. spec_fixtures_rails_sample.jpg
.
Example Project
Any project with an image
What is the current bug behavior?
Incorrect and unexpected file name on save.
What is the expected correct behavior?
Saved filename should match the filename in the Web UI.
Relevant logs and/or screenshots
Output of checks
This bug happens on Gitlab.com
Results of GitLab environment info
Results of GitLab application Check
Possible fixes
This is what the source code looks like under inspect element:
<a download="spec/fixtures/rails_sample.jpg" class="btn btn-sm has-tooltip" target="_blank" rel="noopener noreferrer" title="" data-container="body" href="/gitlab-org/gitlab-ce/raw/master/spec/fixtures/rails_sample.jpg?inline=false" data-original-title="Download"><svg><use xlink:href="https://gitlab.com/assets/icons-d2ccb0e13086d398012c6c445cbd9fc0ed64fb5278cafd89f8be8e0a33a85383.svg#download"></use></svg></a>
This was reported by a customer in https://gitlab.zendesk.com/agent/tickets/126141 (internal use only).
Edited by Adam Mulvany