The WHATWG Fetch spec says this regarding fetching of URLs using the file: protocol:
For now, unfortunate as it is, file URLs are left as an exercise for the reader.
When in doubt, return a network error.
That'd be nice to have a standard way for handling those.