Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 22995)
+++ wp-includes/functions.php	(working copy)
@@ -1537,10 +1537,17 @@
 			//      as wp-content/uploads is used there, and
 			//   2) we are not switched, as ms_upload_constants() hardcodes
 			//      these constants to reflect the original blog ID.
+			//
+			// Rather than UPLOADS, we actually use BLOGUPLOADDIR if it is set, as it is absolute.
+			// (And it will be set, see ms_upload_constants().) Otherwise, UPLOADS can be used, as
+			// as it is relative to ABSPATH. For the final piece: when UPLOADS is used with ms-files
+			// rewriting in multisite, the resulting URL is /files. (#WP22702 for background.)
 
 			if ( defined( 'BLOGUPLOADDIR' ) )
 				$dir = untrailingslashit( BLOGUPLOADDIR );
-			$url = str_replace( untrailingslashit( UPLOADS ), 'files', $url );
+			else
+				$dir = ABSPATH . UPLOADS;
+			$url = trailingslashit( $siteurl ) . 'files';
 		}
 	}
 
