Skip to content

Download File Link Wrong Extension / Name

Summary

Since 11.2 you are able to download a single file via the downloade-button. The URL behind that button seems to be https://<URL>/MyProject/raw/master/Test.hex?inline=false. If I use this link directly in a browser the file does not get downloaded correctly.

The content matches the original file, but the name and/or extension gets changed depending on the extension.

  • ".hex" -> extension gets changed to ".txt"
  • ".eds" -> name gets changed by name of the repository and extension gets changed to ".txt"
  • ".h" -> everything ok (name and extension matches original from repository)

Steps to reproduce

  1. Have a project with a Hex-File, an EDS-File and a Header-File.
  2. Move to the directory of the files.
  3. Open the files.
  4. Click on Download-This-File-Button-> everything OK
  5. Right-click on the button and select "Copy Link"
  6. Paste this link in a browser (should look like https://<URL>/MyProject/raw/master/Test.hex?inline=false)
  7. Press Enter
  • 'test.h' -> gets downloaded as 'test.h'
  • 'test.hex' -> gets downloaded as 'test.txt'
  • 'test.eds' -> gets downloaded as 'test.txt'

What is the current bug behavior?

Name and/or extension gets changed by downloading it via the link.

Environment info

  • GitLab : GitLab Enterprise Edition 11.2.3-ee
  • Browser : Google Chrome Version 68.0.3440.106 64 Bit
Edited by AH