notable / notable

The Markdown-based note-taking app that doesn't suck.
https://notable.app
22.64k stars 1.15k forks source link

Adding attachments doesn't preserve subfolder structure #320

Open RomanKornev opened 5 years ago

RomanKornev commented 5 years ago

Current behavior

Imagine having multiple folders in attachmets dir. Right now we can link to a file in subfolder using [](@attachment/subfolder/file.txt). In contrast, when adding it via "Add Attachments", it just produces attachments: [file.txt]. It still works and the file is not moved. But [](@attachment/file.txt) doesn't link to it.

Expected behavior

Preserve subfolder structure when adding attachment via "Add Attachments": attachments: [subfolder/file.txt] It would be equivalent to [](@attachment/subfolder/file.txt). Only relevant to files added from inside attachments folder. It would eliminate the discrepancy we have now.

thammuio commented 5 years ago

waiting for this fix...

fabiospampinato commented 5 years ago

This would be a bit tricky to fix, as we are currently just storing the file name rather than the relative file path. It would be a useful generalization though.