obsidian-diagrams-net icon indicating copy to clipboard operation
obsidian-diagrams-net copied to clipboard

The plugin should allow configuration so that the attachment is included within the folder where the note is inserted and not in the root folder

Open dlholdefer opened this issue 2 years ago • 1 comments

The plugin is excellent. However, I'm having the following problem:

As a rule, it saves the file in the following location: Attachments/Diagram.svg

However, it creates the "Attachments" folder in the root and not inside the current folder (where the note is being prepared).

Also, it always saves as "Diagram.svg" causing the files to overlap. Ideally, by default, the plugin would automatically increment the name. Example: Diagram1.svg, Diagram2.svg, Diagram3.svg, Diagram4.svg, etc.

Therefore, I kindly request two updates:

  1. The possibility of configuring the plugin so that the attachment is included within the folder where the note is inserted and not in the root folder;

  2. That the diagram is saved with automatic name increment or that the inclusion of a specific name by the user is mandatory, avoiding conflict between two files with the same name.

Thank you very much. The Plugin is a 10!

dlholdefer avatar Jul 01 '22 13:07 dlholdefer

Thanks for the comment! Regarding your points:

  1. I understand this request, and will look into adding this setting for a future version.
  2. It is allready default behaviour for the plugin to increment names (it uses the obsidian API vault.getAvailablePathForAttachments function, which increments names if necessary). If you experience that this is not the case that is a bug I'm not able to reproduce. What version of obsidian on what system are you using?)

jensmtg avatar Jul 11 '22 21:07 jensmtg