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)
Hi cannibalox, we will add local file links soon.
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!
this is great news ! thank you for considering the request and for all the great work on logseq !
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
I found the ‘/upload an asset’ command. (It does not make a link but an attachment.)
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.
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)
Even though this is an old thread that I found while searching for the ability to link to files by referencing %APPDATA% on Windows, here another quick tip:
Linking to a file via PATH variables does not seem to work. At least on Windows. Instead, I create a shortcut in my assets folder and link to that via (…/assets/referencefile.txt.lnk). This seems to work quite nice.
Background here was that I wanted to link to a config file found on different machines I use but they have different usernames so full paths wouldn’t work here.