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

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


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

7 years ago

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

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

7 years ago

Login to comment on this ticket.

Metadata
Attachments 1
Attached 7 years ago View Comment