Buggy Windows External File Links

Links to external files in the 3 possible situations (Preview Mode, Edit Mode, and Embed) on Windows 10 generally misbehave. I’m not sure which of the below methods is recommended, though I’d wish that all would work. The fact that certain methods fail differently is particularly weird, as is the need for file:/// (with 3 forward slashes in Windows) for the only case that works in all 3 link situations (see Additional Information).

Steps to reproduce

Attempt to link to an external file via any of the following:

  1. [no](<C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif>)

  2. [no](file:<C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif>)

  3. [no](file:///<C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif>)

This file should exist for any Windows 10 computer, I think it’s a default one…

Expected result

Link should be clickable in either Edit or Preview mode. Adding ! embeds the gif.

Actual result

In Preview Mode

  1. Nothing Happens
  2. Empty ‘Open With’ Prompt
  3. Windows 'Cannot find <File>’ Error

Embedded gif works:

  1. Yes
  2. No
  3. No

In Edit Mode:

  1. Empty ‘Open With’ Prompt
  2. Nothing Happens
  3. Windows 'Cannot find <File>’ Error


  • Operating system: Windows 10
  • Obsidian version: v0.11.5

Additional information

Full Testing File: (make a new note in the Help Vault to test)

  • / vs \ (native Windows) makes no difference
  • The only one that works is file:/// “Encoded” (i.e. [](file:///C:\Path\To%20File.gif) - (# of / must be 3)
    • 3 makes no sense for Windows…
# Attempts made in Help Vault
file: `C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif`

## Block Escaped (\< File \>)
> [(Edit) Empty 'Open With' | (Preview) nothing](<C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif>)

> ![Fail](<C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif>)

### `file:` Block Escaped
>[(Edit) nothing | (Preview) Empty 'Open With'](file:<C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif>)

> ![Fail](file:<C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif>)

### `file:///` Block Escaped
> [(Edit & Preview) Cannot Find \<File\>](file:///<C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif>)

*# of `/` doesn't matter*

> ![Fail](file:///<C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif>)

## "Encoded" (*no spaces in the first place*)
> [(Edit) Works! | (Preview) Nothing](C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif)

> ![Fail](C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif)

### `file:` "Encoded"
> [(Edit) Works! | (Preview) Nothing](file:C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif)

> ![Fail](file:C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif)

### `file:///` "Encoded"
> [(Edit) Works! | (Preview) Works!](file:///C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif)

*# of `/` doesn't matter*

> ![(Edit) Works! | (Preview) Nothing](file:///C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\Assets\search.gif)

# Now with `/` instead of native `\`
file: `C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif`

## Block Escaped (/< File />)
> [(Edit) Empty 'Open With' | (Preview) nothing](<C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif>)

> ![Fail](<C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif>)

### `file:` Block Escaped
>[(Edit) nothing | (Preview) Empty 'Open With'](file:<C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif>)

> ![Fail](file:<C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif>)

### `file:///` Block Escaped
> [(Edit & Preview) Cannot Find \<File\>](file:///<C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif>)

*# of `/` doesn't matter*

> ![Fail](file:///<C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif>)

## "Encoded" (*no spaces in the first place*)
> [(Edit) Works! | (Preview) Nothing](C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif)

> ![Fail](C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif)

### `file:` "Encoded"
> [(Edit) Works! | (Preview) Nothing](file:C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif)

> ![Fail](file:C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif)

### `file:///` "Encoded"
> [(Edit) Works! | (Preview) Works!](file:///C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif)

*# of `/` **matters!***

> ![Fail](file:///C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/Assets/search.gif)
1 Like

it’s [](file:///urlencodedpathtofile) or [](<file:///pathtofile>)

You can also use ctrl-drop to drop a proper link to a file.

[](<file:///pathtofile>) works for Preview and Embedded media, but not in Edit.

requiring three / for Windows is still… odd.

But thanks for the Ctrl+Drag, that makes this much easier.

what do you mean it doesn’t work in edit?

I mean that Ctrl+Click does not open the file when in Edit Mode.

Here’s an example in Edit Mode:
example  link convention

Which when Ctrl+Click'ing the gray hyperlink makes this pop up:
Buggy Windows 10 'Open With' dialogue with no options but "look for an app in the Microsoft Store"

which is a very buggy ‘Open With’ dialogue, becuase you can’t choose a default app or even look for one. If you use the only option to search the Microsoft Store, you get the search results for “app”. My guess is that means that []<file:///file/path> sends a script to run filepath.app or something.

Ctrl-drag works, but it is an accessibility issue for those who are keyboard only users.

Cajun search/open a feature request for that

1 Like