[Feature Request] Place attachments in the same sub-folder when exporting

It would be great if we can export attachments in the same folder where their notes are located. Currently, when we export, it creates two different folders.

  • Notes - Contains the markdown files and sub-folders
  • Resources - Contains the attachments

I think it would be great if we can export notes/notebooks like this:

- main_folder
--- sub_folder_01
------ note_01.md
------ image_01.jpg
------ document_01.pdf
--- sub_folder_02
------ note_02.md
------ image_02.jpg
------ document_02.pdf
2 Likes

Welcome to the forum!

1 Like

I also really want to keep my notes content+attachment together, but in my case I dont use a resource twice.

Theoretically, is it possible to use a resource twice?
And when exporting, would the consequence be that a resource is exported multiple times in every folder containing a note?

I wouldnt mind perse, tho.

Personally, I think there should be a copy for each note. This way, even if we edit/tamper with the resource, other notes won't be affected.

The main downside to this is it will take up space. However, we can make use of prompts and linking for that.

If a user imports a resource that already exists in Joplin, the user will be shown a prompt. Something like this:

This resource already exists, please choose an option:
* Link the existing resource
* Import

If there are multiple same resource that exists in Joplin, the user should also be shown a picker to choose which one they want to refer to.

I really need this feature as well! I want to create backups of my notes that are usable without joplin.
When I'm exploring my notes with a simple file explorer and text editors it would be really helpful to have the attachments in the corresponding folders.

Since there seems to be no existing solution, you could take a try and implement it using Joplins data API. However, there might be some obstacles, like spanning up a tree with all notebooks, notes and resources and handling duplicated notebook names. Also for reimporting, you would need to write another custom script.

Edit: I took a try and wrote a script without considering many corner cases. It works on linux for my Joplin profile (314 notes, 9 resources):