Drag and drop and cut/copy/paste of any file into a document should copy the file into the vault attachments folder as an internal ![[file]] link: If the file format is recognised, it should be transcluded; If the file format is not recognised, there should be a button offering to open the file in the default program for that format.
File links (file:///full path) should be used where the intention is to retain the file outside the vault.
This request is prompted by a question yesterday on the discord and a realisation that I will need to be doing a lot of this in the near future.
It is apparent that there are many inconsistencies in the current system, eg:
only a limited number of formats can be dragged
some dragged files are transcluded, PDF offers a button to open in default program, HTML and TXT have the content pasted into the file.
Pasting doesn’t work. Mostly. Pasting a URL gives a path which, in preview, has a button to open in default program.
File links work, but they require more time and effort to operate so it would be best if they were reserved for those occasions when users want the file to stay in its current location outside the vault.
The request has been triggered by a question on the discord yesterday and a realisation that I will have to be doing a lot of this in the near future.
And conceptual consistency makes for a better user experience.
I far prefer using a separate attachments folder for each vault.
Unless you use a lot of folders in a vault, the list of files in the vault folder can quickly be overrun with attachments - which may not have an obvious name.
I’m fine with there being an option for save in same folder, but not as a default.
I would Obsidian just let you organize your files. Show files in the tree, and then it’s easy to drag a file into a document to create a link, or click the file to open it direct.
When i first attached some pdf file to the note to add some notes on content of this file it comes to mind to use such technique to all kind of my work-files, to add meta-information on how this file was created, to what project it relates, etc.
It was really sad, that i can’t add different filetypes to notes. So i also really want this feature to be added.
+1 I was just moving over my screenplays folder into Obsidian and in most folders I have filetypes that Obsidian can’t open (Scribner, Final Draft, among others). It would be great if I could just drag and drop those local files into an existing note and have Obsidian auto-create the local URI link to them (e.g., file:/// etc with the %20 for spaces).
I would love this feature to be implemented. I use links to file outside the vault all the time and it would save a lot of typing.
From the UI point of view I believe consistency is paramount though:
“simple” drag and drop should do always the same thing to cover the most frequent use-case, e.g.:
insert an internal link if the file is inside the vault;
create a copy in the vault & insert an internal link to it if the file is outside the vault; (note: for me is not the most frequent use-case but from the discussion above it seems a sensible choice).
drop with modifiers (cmd, alt, ctrl, …) should perform specific actions:
alt+drop: insert an external link [filename](file://FILEPATH) where FILEPATH is urlencoded automatically
cmd+drop: as “simple” drag, but insert the link with a ! in front
cmd+alt+drop: combine “alt+drop” and “alt+cmd+drop”