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]: upload attachment in the same folder of md file #350

Closed
1 task done
yangtfu opened this issue Jun 6, 2024 · 1 comment
Closed
1 task done

[FR]: upload attachment in the same folder of md file #350

yangtfu opened this issue Jun 6, 2024 · 1 comment
Assignees

Comments

@yangtfu
Copy link

yangtfu commented Jun 6, 2024

Issue validation

  • I checked the issue to prevent duplicate

Is your feature related to a problem ?

It seems the attachment upload folder cannot be set as the same folder of md file now.
Like this in hugo.

What solution do you want to see ?

Give a option to upload in the same folder or provide a variable refering to frontmatter.

Describe the alternative you've considered

No response

OS

Windows

Anything else?

No response

Plugin version

7.2.8

Obsidian version & debug log

SYSTEM INFO:
	Obsidian version: v1.5.12
	Installer version: v1.4.16
	Operating system: Windows 10 Enterprise 10.0.22631
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 9
	Plugins enabled: 7
		1: AidenLx's Folder Note v0.16.5
		2: Folder Note Core v1.3.5
		3: Auto Split v1.1.2
		4: Dataview v0.5.66
		5: Linter v1.24.0
		6: Enveloppe v7.2.8
		7: Attachment Name Formatting v2.1.8

RECOMMENDATIONS:
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
@Mara-Li
Copy link
Member

Mara-Li commented Jun 6, 2024

The problem is: if you use an attachment multiple time, it will be send multiple time. Meaning to duplication, and probably problem when using the cleaning function.

Moreover, a file is send "detached" from it sources, aka I don't save the source TFile or the path. A file can come from multiple source, and it can become tricky to also save in the methods all source.

I have some solution:

  • Set on "obsidian" for the path, and use a structure like that in your Obsidian
  • Override with a frontmatter key the path for attachment for each notes you need to do that
  • Maybe tricks around regex using overriding attachment. For example, if you note each attachment linked to the note notename-imagename you can make a regex on /^notename/gi and the remplacement on PathInWant/{{name}}

@Mara-Li Mara-Li closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants