obsidianmd / obsidian-importer

Obsidian Importer lets you import notes from other apps and file formats into your Obsidian vault.
https://help.obsidian.md/import
MIT License
695 stars 64 forks source link

[Apple Notes] Image file name conflict results in "(error reading attachment)" #192

Open solidgonk opened 8 months ago

solidgonk commented 8 months ago

When importing from Apple Notes, "(error reading attachment)" may occur.

I suspect that this is related to a naming conflict of images when they're placed in the same attachments folder. I have a dozen or so images named "pasted graphic.png" (you can search this in the Apple Notes search field), and they are all coming up with that error.

I'm not sure if the solution here is to rename the filename (i.e. "pasted graphic-01.png") during import?

solidgonk commented 8 months ago

This also appears to affect other attachments with duplicate names, such as html.

Johannnnes commented 8 months ago

Same here, with .TIFF, amongst others

alexrecuenco commented 7 months ago

Same here,

I have a myriad of PDF documents that I just scanned, so they are called "Scanned documents" and it failed to import many of them correctly when they are on the same note.

Also, when fixing this, keep in mind that "filenames" in notes can have characters that are not valid filenames (like / or \n), and those notes work on iOS and they don't work on macOS "sometimes" (at least last time I tried, they might've fixed it in the last months, it was still broken around November 2023)