Option / Alt + Drag-and-Drop to insert (sanitized) reference to external file

Use case or problem

I would like to be able to insert a link to an external file outside of the vault simply by holding down an appropriate modifier key (e.g. option / alt) and dragging and dropping the file into a note in Obsidian.

The link would preferable be a valid link i.e. any spaces in the path would be replaced by %20, or alternatively, the path would be encapsulated in ‘<’ and ‘>’ if it contains spaces.

I work with a lot of external PDFs which all have spaces as part of their filenames (as the filenames correspond to titles), so the above described automatic sanitization of the path would be helpful.

I’m not proposing changing the current behavior of importing a file into the vault when dragging and dropping the file into a note, but to extend, via modifier keys, the drag-and-drop functionality to also support inserting a link to an external file.


2 posts were merged into an existing topic: Drag and drop to create attachment links (without need to preview)