How link to any local file with markdown syntax?

Alexis Le Provost picture Alexis Le Provost · Sep 14, 2015 · Viewed 118.8k times · Source

I have a local markdown file containing several links and I want that links head to local file like pdf.

I use the following syntax:

[my link](file:///C:/my_file.pdf)

But when I open my markdown file into a Firefox page and click on the link, nothing happens.

What exactly have I missed? Is it possible to open local file?

Answer

BringBackCommodore64 picture BringBackCommodore64 · Jan 5, 2018

None of the answers worked for me. But inspired in BarryPye's answer I found out it works when using relative paths!

# Contents from the '/media/user/README_1.md' markdown file:

Read more [here](./README_2.md) # It works!
Read more [here](file:///media/user/README_2.md) # Doesn't work
Read more [here](/media/user/README_2.md) # Doesn't work