3 ms·
Why would you need an attachment for this? Couldn't you 'refactor' the notes instead? Not sure that vendor lockin is worth it. The problem is worth solving but
by bosie 7y ago
Why would you need an attachment for this? Couldn't you 'refactor' the notes instead? Not sure that vendor lockin is worth it. The problem is worth solving but IMO you are going about it the wrong way.
- fabiospampinato 7y agoYou might be right, but it's not as simple at it sounds. By using something like `@attachment/UUID` you don't have to refactor anything if the attachment gets renamed or modified. The somewhat unsolved issue there though is reliably keeping track of which UUID maps to which file. If you're using regular links and rename an attachment, worst case scenario, you have to parse all notes, find all links pointing to the renamed attachment and update those, which can get expensive. Also regular path-based links can be a problem when you move the _note_ somewhere else too. Plus how do you know something got renamed instead of the old attachment got deleted and a new one got created? This is partially a problem for the UUID-based approach too however. Lastly what kind of link should you use to link to a note stored in another data directory? Relying on the absolute paths is too brittle, and it won't work at all when the app will also be able to run in the browser.