When the file name or the prefix contains `#`, whatever comes after is ingored. This is fixed by encoding the object path using encodeURIComponent. Fixes #11112