Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Ability to drag & drop attachments to properties #14

Open
ac8318740 opened this issue Dec 11, 2024 · 5 comments
Open

[FR] Ability to drag & drop attachments to properties #14

ac8318740 opened this issue Dec 11, 2024 · 5 comments

Comments

@ac8318740
Copy link

Loving the plugin so far!

I'd love the ability to drag & drop attachments to properties (e.g., I have a source_materials property. I currently have to drag attachments into the note body, then cut/paste the link into the property field.

When trying to drag and drop into properties directly now, it asks to open the file and doesn't insert it.

@alberti42
Copy link
Owner

Ok. I never thought about this possibility. Just curious, can you give an example about how an attachment in the link should look like?

@ac8318740
Copy link
Author

Here's an example:
image

Frontmatter for this:


view_count: 1
source_materials:

  • "[[!AutoStorage/!Attachments/Attachment1.pdf|Attachment1.pdf]]"
  • "[[!AutoStorage/!Attachments/Attachment2.pdf|Attachment2.pdf]]"
  • "[[!AutoStorage/!Attachments/Attachment3.pdf|Attachment3.pdf]]"

@ac8318740
Copy link
Author

And core benefit for me as having these in frontmatter is to make it easier to reference / display in tables (e.g., dataview, datacore, db folder, etc.)

@alberti42
Copy link
Owner

Ok. I see, you even have multiple entries for a single property. But then I need to think about the separator. Should it be a just a space? Interesting approach. I also like to keep all documents attached to the vault somehow referenced in my notes.

However, I prefer to drag multiple of them a once and this creates a bullet point list. Then I add a little bit of comments, just to avoid that the vault becoming a container of any kind of "stuff".

However, I can see the use in your workflow too.

PS: But why do you use the exclamation mark ! inside the filename? Is it an Obsidian thing?

@ac8318740
Copy link
Author

In frontmatter, the format that Obsidian uses for "List" type properties is the below (each list item is two spaces followed by "-" followed by one space, then the value. The format for files in frontmatter is the same, except that the double square brackets are wrapped in double quotes.

Property_Name:

  • "[[Some link here]]"
  • value without link

Re: your question about the exclamation mark, that is just the name of my folder so it goes to the top of the list. Similar to using any of "." "_" or "00.". Nothing to do with Obsidian (and probably actually poor form given Obsidian uses "!" for other things like embedding, but it works fine for my vault and I haven't changed it in a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants