Percent-encode unsafe characters in a filename when composing each URL.