Downloading CSS and HTML Customizations export fails

I have some customization in a Discourse-hosted Discourse. When I hit export, I get a Failed - No File error in Chrome, with the file-name shown there as the customization’s ID.

If I then open the Chrome downloads page, and click on the failed link, it will download the file correctly. Here below the lower is the earlier file, shows failure, then I’ve clicked on clicked on that entry, and then the upper download happened with the correct filename and all.

I’m using Chromium 56.0.2924.87 on Linux 64-bit

2 Likes

Can you repro @techapj?

2 Likes

I can repro this issue. Added on my list.

4 Likes

how can you open & edit .json file

@imrehg

@Bruges a json file is simply a fancy formatted text file. You can open it with your favorite text program, like Notepad, TextEdit, Notepad++, Sublime, Atom, etc.

2 Likes

This issue was specific to Chrome/Chromium browser.

Chrome browser was not including HTTP_ACCEPT header when requesting file download. I fixed this issue by removing download attribute (from anchor tag) so now Chrome is making download request with HTTP_ACCEPT header included. Verified that download is working fine on Firefox and Safari as well.

https://github.com/discourse/discourse/commit/dfd5b06c82ab30632ba6fdef224f8971eab0a44e

5 Likes