Index: src/wp-admin/async-upload.php
===================================================================
--- src/wp-admin/async-upload.php	(revision 34161)
+++ src/wp-admin/async-upload.php	(working copy)
@@ -62,7 +62,10 @@
 			if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) )
 				echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />';
 			echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '" target="_blank">' . _x( 'Edit', 'media item' ) . '</a>';
-			$title = $post->post_title ? $post->post_title : wp_basename( $post->guid ); // Title shouldn't ever be empty, but use filename just in case.
+
+			// Title shouldn't ever be empty, but use filename just in case.
+			$file = get_attached_file( $post->ID );
+			$title = $post->post_title ? $post->post_title : wp_basename( $file );
 			echo '<div class="filename new"><span class="title">' . esc_html( wp_html_excerpt( $title, 60, '&hellip;' ) ) . '</span></div>';
 			break;
 		case 2 :
Index: src/wp-admin/custom-header.php
===================================================================
--- src/wp-admin/custom-header.php	(revision 34161)
+++ src/wp-admin/custom-header.php	(working copy)
@@ -1116,7 +1116,7 @@
 	 */
 	final public function create_attachment_object( $cropped, $parent_attachment_id ) {
 		$parent = get_post( $parent_attachment_id );
-		$parent_url = $parent->guid;
+		$parent_url = wp_get_attachment_url( $parent->ID );
 		$url = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url );
 
 		$size = @getimagesize( $cropped );
Index: src/wp-admin/includes/ajax-actions.php
===================================================================
--- src/wp-admin/includes/ajax-actions.php	(revision 34161)
+++ src/wp-admin/includes/ajax-actions.php	(working copy)
@@ -3155,7 +3155,7 @@
 			/** This filter is documented in wp-admin/custom-header.php */
 			$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
 
-			$parent_url = get_post( $attachment_id )->guid;
+			$parent_url = wp_get_attachment_url( $attachment_id );
 			$url        = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url );
 
 			$size       = @getimagesize( $cropped );
Index: src/wp-admin/includes/class-wp-media-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-media-list-table.php	(revision 34161)
+++ src/wp-admin/includes/class-wp-media-list-table.php	(working copy)
@@ -370,7 +370,13 @@
 			<?php echo $link_end; ?>
 			<?php _media_states( $post ); ?>
 		</strong>
-		<p class="filename"><span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span><?php echo wp_basename( $post->guid ); ?></p>
+		<p class="filename">
+			<span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span>
+			<?php 
+			$file = get_attached_file( $post->ID );
+			echo wp_basename( $file );
+			?>
+		</p>
 		<?php
 	}
 
Index: src/wp-admin/includes/class-wp-site-icon.php
===================================================================
--- src/wp-admin/includes/class-wp-site-icon.php	(revision 34161)
+++ src/wp-admin/includes/class-wp-site-icon.php	(working copy)
@@ -80,7 +80,7 @@
 	 */
 	public function create_attachment_object( $cropped, $parent_attachment_id ) {
 		$parent     = get_post( $parent_attachment_id );
-		$parent_url = $parent->guid;
+		$parent_url = wp_get_attachment_url( $parent->ID );
 		$url        = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url );
 
 		$size       = @getimagesize( $cropped );
Index: src/wp-admin/includes/media.php
===================================================================
--- src/wp-admin/includes/media.php	(revision 34161)
+++ src/wp-admin/includes/media.php	(working copy)
@@ -1368,7 +1368,8 @@
 	$toggle_on  = __( 'Show' );
 	$toggle_off = __( 'Hide' );
 
-	$filename = esc_html( wp_basename( $post->guid ) );
+	$file = get_attached_file( $post->ID );
+	$filename = esc_html( wp_basename( $file ) );
 	$title = esc_attr( $post->post_title );
 
 	$post_mime_types = get_post_mime_types();
Index: src/wp-includes/media.php
===================================================================
--- src/wp-includes/media.php	(revision 34161)
+++ src/wp-includes/media.php	(working copy)
@@ -1175,7 +1175,7 @@
 	<img src="{{ data.thumb.src }}"/>
 	<# } #>
 	<div class="wp-playlist-caption">
-		<span class="wp-playlist-item-meta wp-playlist-item-title"><?php 
+		<span class="wp-playlist-item-meta wp-playlist-item-title"><?php
 			/* translators: playlist item title */
 			printf( _x( '&#8220;%s&#8221;', 'playlist item title' ), '{{ data.title }}' );
 		?></span>
@@ -2076,7 +2076,8 @@
 	if ( ! is_object($attachment) )
 		return array();
 
-	$filename = basename($attachment->guid);
+	$file = get_attached_file( $attachment->ID );
+	$filename = basename( $file );
 
 	$objects = array('attachment');
 
Index: src/wp-includes/post-functions.php
===================================================================
--- src/wp-includes/post-functions.php	(revision 34161)
+++ src/wp-includes/post-functions.php	(working copy)
@@ -4648,7 +4648,7 @@
 	foreach ( $comment_ids as $comment_id ) {
 		wp_delete_comment( $comment_id, true );
 	}
-	
+
 	wp_defer_comment_counting( false );
 
 	$post_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $post_id ));
@@ -4974,7 +4974,8 @@
 			$mime = (int) $mime;
 			if ( $post = get_post( $mime ) ) {
 				$post_id = (int) $post->ID;
-				$ext = preg_replace('/^.+?\.([^.]+)$/', '$1', $post->guid);
+				$file = get_attached_file( $post_id );
+				$ext = preg_replace('/^.+?\.([^.]+)$/', '$1', $file);
 				if ( !empty($ext) ) {
 					$post_mimes[] = $ext;
 					if ( $ext_type = wp_ext2type( $ext ) )
