Links to external files do not work in callouts

Steps to reproduce

  1. Create a link to a document in my file system:
    image

  2. Click the link. The file opens as expected.

  3. Put the link in a callout:
    image

  4. Click the link in the callout. Nothing happens.

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

The linked file should open.

Actual result

The linked file does not open. Nothing happens. Other kinds of links work fine (e.g. internal links, URLs). Only external links to files do not work.

Environment

SYSTEM INFO:
Obsidian version: v1.4.16
Installer version: v1.4.13
Operating system: Windows 10 Home 10.0.19045
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

I’d double check your path syntax is correct. Moving the cursor out of the callout (so it renders) and clicking the link: both of these work for me.

Screenshot 2023-10-25 073738

Screenshot 2023-10-25 074321

sublime_text_0FiNhaslWA

external link to file →
[link text](file:///C:\Users\USER\Desktop\file.txt)
[link text](<file:///C:/Users/USER/Desktop/file with spaces.txt>)
[link text](file:///C:%5CUsers%5CUSER%5CDesktop%5Cfile.txt)

The slashes can be forward or backward here; It doesn’t seem to matter. I wasn’t sure because I mainly use a mac which uses / for paths.

Hi. Is that file:/// documented somewhere? You seem to provide useful information about it.

It’s mentioned in the https://help.obsidian.md/User+interface/Drag+and+Drop section, but the specifics I picked up from the forum or trying things out.

  • Hold Ctrl on Windows/Linux or Option on macOS to create file:/// absolute links to those files instead of importing a copy.

You can submit errors, typos, or omissions to the documentation here: https://github.com/obsidianmd/obsidian-help

2 Likes

Yeah, I’m wondering if @blue_emperor tried this link syntax outside a callout, because I suppose ot wouldn’t work there either.

Thanks, this works. Sorry, I thought I had previously tried the correct syntax you show with the file:/// prefix to the file path, but it turns out I was missing a forward slash (I had file://C:/…). Whoops!

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