Open attachments by links
geshaowen opened this issue · comments
When using FSNotes, I need to associate local files, such as PDF, Word, Excel, etc. Currently, after adding a link, I cannot directly open the file. I hope to add a feature where clicking on the link can directly open the corresponding attachment.
Assuming macOS. It's possible with a bit of extra knowledge.
You can do this in Markdown, note there are 3 slashes after file:
the third of those is part of the path.
[PDF](file:///Users/yourname/Documents/folder/file.pdf)
You can the file path by copying the file in Finder and then pasting into FSNotes will paste the file path.
- You can click the link and it will show the file in Finder
Then you will still need to open the file manually (Cmd+O, or Cmd+Down cursor)
- If you right click and choose "Open in Preview" (or whatever app) it will not open
error: The application “FSNotes” does not have permission to open “file.pdf”.
SO:
- Use the "Open" service from https://github.com/glushchenko/fsnotes/wiki/Services-(macOS)#downloads
Then you can right click the link, choose Services > Open and the file will open in its default app (you can change the default app per-file or globally using the Get Info window on a file of a particular type).
You can also set a hotkey for this Service through System Settings > Keyboard > Keyboard Shortcuts... > Services > Text > Open, but I'm not sure it would make things much easier as you would still need to right click the link before pressing the key.