Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4

====== Attachments ======
Created Friday 18 December 2009

Attachments live in the same folder as the notes. This limits the use of text files as attachments as zim will confuse them for pages and try to open them. Sometimes that is not an issue other times it may fail.

To distinguish better between notes and attachments we could check the content, e.g. match on the header of a note. However this may have the disadvantage that we have a name conflict between page names and attachment names.

Alternatively we can use a special file extension for zim (like .zim or .zim.txt). This has been discussed extensively, but no consensus reached. Also this can not for 100% exclude the possibility of conflicts.

So we need to be able to deal with conflicts anyway. In that case checking page contents is not a bad idea. Would need a property for this behavior for backward compatibility. Maybe even a user visible property "all text files are pages".


Useful features when we implement an attachment manager
* Rename, Move, Delete
* Create from template (like filebrowser)
* Open with application - would need vfs or check out + modify + checkin ?


Another issue with attachments is that we can generate a lot of orphaned attachments, e.g. due to the equation editor. Tool to clean up all unlinked attachments could be useful.

