A solution to the "file could not be found" issue for pasted files into note with invalid characters []#^|

Use case or problem

Pasted files with invalid characters in them fail to embed and instead “file could not be found” message is displayed in the note. The attachment file does get imported into Obsidian’s attachment folder with the invalid characters in the file name which then needs to be manually navigated to and renamed which then needs to be inputted into the note manually. All of this is very inconvenient and time consuming if your files follow certain naming schemes that include obsidian’s invalid characters often.

Proposed solution

Automatically rename pasted file name by replacing Obsidian’s invalid characters [ ]#^| with look-alike unicode characters. The yt-dlp program does this with invalid filename characters to avoid output errors. they call it “filename-sanitization”. The advantage with this is that you still get to visually keep your filename without removing any information/structure from the filename.

Current workaround (optional)

No workaround. Hard manual labor.

Related feature requests (optional)

1 Like