konodyuk / obsidian-typing

Programmatic customizations for groups of notes
https://konodyuk.github.io/obsidian-typing/
MIT License
134 stars 8 forks source link

File Uploads Destination Directory Parameter #13

Open AriZoneVibes opened 12 months ago

AriZoneVibes commented 12 months ago

Testing the plugin (I really love it so far) seems, file uploads are placed in files folder in root.

A welcome functionality would be having the parameter to set the directory where the file should be saved, and the default value being the folder that was set as Attachments Folder in Obsidian Settings or a path set in the plugin settings.

konodyuk commented 11 months ago

Sorry for not answering earlier; this is actually supported, but is not documented yet as well as some other features.

You can use folder parameter of File field type, like this:

type A {
    fields {
        file: File[folder="path/to/destination/folder"]
    }
}

I'll also see if I can default to Attachments Folder in future versions.