Allow links / embeds to local files

this is a feature request to enable links and embeds to local files (docs, images, videos…), eg:
![file:///c:/image.png], [[file:///home/user/somedoc.txt]] or [](file:///c:/users/docs/file.pdf)

3 Likes

Hi cannibalox, we will add local file links soon.

7 Likes

Really looking forward to this Michael. Thanks for all the hard work and effort you are putting in to make Logseq what is is becoming!

1 Like

this is great news ! thank you for considering the request and for all the great work on logseq !

2 Likes

This feature has been implemented.
Will move this to the archive.

How does one do this?

I can’t find any documentation on this. I’m having to go by others posts to manually code the URL/URI as markdown. Is that the only way?

I’m sorry - i don’t see a slash command either

1 Like

I found the ‘/upload an asset’ command. (It does not make a link but an attachment.)

1 Like

I assume you found the answer as it has been a while, but I am new and wanted to complete this just for anyone else needing the information.

Just use the /link slash command. Then in the “link” box add the location of the file or folder and use the “file://” before adding the pathname. Then add a label in the label box. Or if using keyboard use “[label here] (file://pathname here)”. See first post for examples.

Also, it is easy to get the filepath on a mac. Just right-click the file or folder, then press and hold the OPTION button to get the “copy to pathname”. Probably something similar on PC.

4 Likes

a piece of information if someone finds a way to this thread. if you want to save the file to your logseq folder and then push it to the cloud or repo, now you can use the command /upload an asset it will open a window to pick your image then It will generate a link like this ![image-name.jpg](../assets/image-name.jpg)