Tried making a file-saving token for a file named “Image #1 copy.jpg”.
It stops at the following step:
const saveFile = await saveToFolderEntry.createFile(nameOfDocument, {overwrite: true});
where nameOfDocument = “Image #1 copy.jpg”
If I remove the “#” so that nameOfDocument = “Image 1 copy.jpg”, then it works.
Not sure yet what other special characters are affected, but the hashtag character appears to be problematic.
nameOfDocument = “Image-1 copy.jpg” appears to work. So a hyphen is acceptable.
Bit frustrating that these special characters cause problems like this. I use the hashtag character in my images all the time and assume at least some plugin users will use it too as well as other special characters.
Is it necessary to search through these document names and remove/replace special characters, or is there another solution? Also, is there a list of special characters to avoid?