Links to uploaded files in topic details are wrong (try.discourse.org)

AI-generated summary

In the Site feedback category, gerhard reported that links to uploaded files in topic details on try.discourse.org were incorrect, redirecting to the main domain instead of the virtual host. Despite an initial comment from codinghorror that the issue appeared resolved, gerhard confirmed the links remained broken, showing a 404 error. yusf noted a similar bug where the single post link worked, but the topic details link failed, though pasting the URL directly into the browser sometimes triggered a download. riking identified the root cause as Ember incorrectly routing to /raw/ paths. codinghorror then sought assistance from @techAPJ, who resolved the issue in pull request #3507.

I’ve just noticed that at try.discourse.org the links to uploaded files in the topic details are wrong.

Steps to reproduce:

The link in the topic details is:
http://try.discourse.org/uploads/try2_discourse/102/ec5829847a91b748.log

The actual working link (as seen in the post) is: http://virtual-host-discourse.global.ssl.fastly.net/uploads/try2_discourse/102/ec5829847a91b748.log

「いいね!」 4

These look OK to me now.

Nope, they are still wrong:

aha, OK, I see… I edited the post on the staging site. Will be fixed the next time try deploys. Feel free to flag this if still an issue.

「いいね!」 1

This is still an issue.

Almost the same bug: I get the same exact URL (to an uploaded file in this case) in single post and in topic details, but only the single post link works. Clicking the topic details link gives me:

The page you requested doesn’t exist or is private.

Here’s the weird part though:

  1. select failed download URL in browser location bar
  2. hit return key
  3. file download starts
「いいね!」 1

Maybe this is something you could assist with @techAPJ?

「いいね!」 1

This is the same error with clicking a link to /raw/ - Ember tries to route to it, finds no route, gives 404 page even though the server would reply if you asked it.

「いいね!」 1

Fixed :ant:

https://github.com/discourse/discourse/pull/3507

「いいね!」 4