alberti42 / obsidian-import-attachments-plus

Import attachments by moving them into the vault.
MIT License
7 stars 0 forks source link

allow using obsidian's attachments folder #2

Closed KraXen72 closed 1 week ago

KraXen72 commented 1 month ago

currently, you can only use a folder relative to the note, or create a new folder at the top of your vault. please allow the user to select Obsidian's attachments folder - if in obsidian settings, i set it to be a folder called assets, new attachments will be in assets/note name/image.png (example).

if you can't easily get the obsidian's attachment folder path, please allow the user to select an attachment folder based on a relative path to the vault root. thanks!

alberti42 commented 1 month ago

Good point! This will be done.

So you are talking about the third option in the image:

Bildschirmfoto 2024-07-30 um 20 24 51

I did not think about it. But it can be done in the next days.

alberti42 commented 1 month ago

I have improved the overall plugin and added the requested feature. In the hindsight, it was already possible to create any subfolder before because you could choose relative to vault, and then specify a folder name as assets/${notename}. Automatically, you would get your image to assets/note name/image.png.

However, I decided to strictly follow the naming convention used by Obsidian and provided more options in the dropdown menu. I was always confused what Obsidian meant by the four options, because two are redundant. I have looked inside Obsidian code, and indeed one would not need them.

That being said, I am glad to align my plugin to Obsidian notation if people find it more intuitive.

I am still testing version 1.4.0, which is not released yet. If you could install it (see zip file) and try it, I would be grateful for your feedback.

alberti42 commented 1 month ago

Here is the zip file with the preview of version 1.4.0. You can move the three files into <YOUR_VAULT>/.obsidian/plugins/import-attachments-plus and restart Obsidian.

plugin.zip

KraXen72 commented 1 month ago

hi! thanks a lot! i'm pretty busy in the following weeks, so no promises, but if i do find the time, i'll test it. otherwise i'd suggest asking somebody in obsidian discord to test it.

alberti42 commented 1 month ago

Thanks for the feedback. If you do not have time to test the new version, you can try the one currently released. It already resolves your problem, as I described above. Just select "vault" and then enter the path path1/path2/${notename} anything more you like for the folder name.

alberti42 commented 1 week ago

I believe the feature has been implemented. I close this issue. You are welcome to reopen it if you think something is still missing.