This is a continuation of the discussion from Left clicking /raw/ links return 404 errors, which was closed.
I just noticed that if I upload an attachment and then I left-click on a link for it in the body of a forum post, the Discourse/Ember router doesn’t know what to do and I get a “Oops! That page doesn’t exist or is private.” error. The link will work fine if the user opens it in a new tab.
Here is an example of a forum post with a link (Opcode.cs) that doesn’t work when you left-click on it:
I tried to make an example attachment link on this forum that doesn’t work, but attachments for this forum are served from a different domain so I cannot trigger the bug. The bug only affects forums that are serving attachments from the same domain as forum posts.