Trying to put attachments as markdown links with custom display text creates link to new page with strange title rather than linking to underlying attachment when clicked

Once you’ve done the above, delete everything above this line.

Steps to reproduce

  1. Add an attachment to the vault.
  2. Open a new/existing note.
  3. Attempt to link to that attachment using markdown link with custom display text (e.g. Link.
  4. The text will display as “Link” when clicking off as you would expect.
  5. When you click the hyperlink, instead of taking you to the attachment it creates a new page with a small amount of the attachment text with brackets still included (e.g. “[[Attachment”)
  6. I have tried this on mobile as well and the “Link” instead just cannot be clicked.

Did you follow the troubleshooting guide? [Y]

Yes, have reproduced this in the sandboxed vault.

Expected result

I expected the attachment link to display with the custom text - “Link” - Then display as “Link” when clicking off. Then allow me to click the “Link” and take me to the underlying attachment.

Actual result

Clicking the link creates a new page “[[Attachemnt”.

Environment

SYSTEM INFO:
Obsidian version: v1.4.14
Installer version: v1.3.7
Operating system: Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64 22.3.0
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information



Shouldn’t it be [pdf](my.pdf)? That seems working for me.

CleanShot 2023-10-15 at 16.55.43

Maybe you’re right and I’m trying to do something impossible.

I was trying to get WikiLinks to display with custom text. So I could link to a page or attachment but display different text. I can reproduce this by using square brackets around the name I want displayed followed by normal brackets around an Obsidian URL link to where I want it to go.

I just thought you would be able to type “[Name I Want Displayed]” then immediately ([[Link to Note/Attachment]]) and it would display with the custom text that would go to the linked page when clicked.

Using the Obsidian URL in place as above seems like a good (but slightly longer) way of doing the same thing. Obviously, if I move the file, the link will break, unlike the WikiLink. Thanks for your help. If I’m missing anything please do let me know.

Wikilinks display text is written as [[my pdf.pdf|pdf]].

1 Like

Dammit. I was looking in the completely wrong place and went down a rabbit hole of trying to use Markdown links with WikiLinks rather than this obvious solution. Thank you @ariehen!

1 Like

It is best to find out right away more about what the process looks like for creating a link to your notes, then attachments and all files in your notes, using internal links only. In future, this will make it easier or simpler for you to carry out individual tasks without the errors you mentioned. :slightly_smiling_face: :upside_down_face: :slightly_smiling_face:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.