I'm not a big fan of using file APIs on URLs directly. For example, is `url` URL-encoded? If so, we'd need to decode it before trying to interpret it as a file path, e.g. if URL contains ' ', '(', '[', etc.