#2169 attachment download is broken
Closed: Fixed Opened by mreynolds.

When you try to download an attachment using the "download" button it downloads the html page, and not the actual attachment.


Let's test :)

Kernel_git_lola.png

Seems to work here

Doesn't work for me :(

Try downloading an attachment from this ticket:

https://pagure.io/389-ds-base/issue/49177

I get an html file every time - perhaps its related to the fact its a patch file, and not a binary/image?

It is not issue in browser because curl do the same

sh$ curl -o test.patch https://pagure.io/389-ds-base/issue/raw/files/aa55a6c32e92e6c9af8af162c45c6419e1cff3abaa1ff95636fcaf1bf5fb89d8-0001-Ticket-49177-rpm-would-not-create-valid-pkgconfig-fi.patch
sh$ file test.patch 
test.patch: HTML document, UTF-8 Unicode text

Metadata Update from @lslebodn:
- Issue tagged with: IDM

BTW works well with curl after appending ?raw=1 to URL. Maybe it shoudl be a default for download button.

Yeah, it's related to the feature you added to nicely render a patch when viewed as in the raw endpoint, adding the ?raw=1 should fix this

Filed PR:

https://pagure.io/pagure/pull-request/2195

Fixed by @mreynolds in https://pagure.io/pagure/pull-request/2195

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Metadata