Refine the `File::sendToBrowser()` method (see #4600)