const [handle] = await window.showOpenFilePicker();
const file = await handle.getFile();
const contents = await file.text();

Developers sometimes concatenate strings to form URLs, forgetting to encode or decode properly. For example:

# Pseudo-code that could generate such output
base = "fetch-url-file:"
path = "///some/resource"
full = base + path  # "fetch-url-file:///some/resource"

If they then mistakenly print or log the encoded version of this full string (applying percent-encoding to the colon and slashes), they might get fetch-url-file-3A-2F-2F-2Fsome%2Fresource.

But in the given keyword, there is no trailing path — it stops after three slashes, so it might be an incomplete or truncated log fragment.

While standard browsers block it, there are specific environments where fetch('file:///...') does work:

Verify that it decodes to fetch-url-file:///. Use a simple tool:

echo "fetch-url-file-3A-2F-2F-2F" | sed 's/3A/:/g; s/2F/\//g'

Or in Python:

import urllib.parse
s = "fetch-url-file-3A-2F-2F-2F"
print(urllib.parse.unquote(s.replace("-", "%")))  # Replace hyphen with % for proper decoding

Node.js does not have the same origin restrictions. With the --experimental-fetch flag (Node 17+), you can fetch local files:

const response = await fetch('file:///home/user/data.txt');
const text = await response.text();