Index: wp-includes/js/media-editor.js
===================================================================
--- wp-includes/js/media-editor.js	(revision 22857)
+++ wp-includes/js/media-editor.js	(working copy)
@@ -459,10 +459,11 @@
 
 			link: function( embed ) {
 				return media.post( 'send-link-to-editor', {
-					nonce: wp.media.view.settings.nonce.sendToEditor,
-					src:   embed.linkUrl,
-					title: embed.title,
-					html:  wp.media.string.link( embed )
+					nonce:   wp.media.view.settings.nonce.sendToEditor,
+					src:     embed.linkUrl,
+					title:   embed.title,
+					html:    wp.media.string.link( embed ),
+					post_id: wp.media.view.settings.postId
 				}).done( function( resp ) {
 					wp.media.editor.insert( resp );
 				});
Index: wp-includes/js/media-views.js
===================================================================
--- wp-includes/js/media-views.js	(revision 22857)
+++ wp-includes/js/media-views.js	(working copy)
@@ -12,6 +12,9 @@
 	media.view.settings = l10n.settings || {};
 	delete l10n.settings;
 
+	// Copy the `postId` setting over to the model settings.
+	media.model.settings.postId = media.view.settings.postId;
+
 	// Check if the browser supports CSS 3.0 transitions
 	$.support.transition = (function(){
 		var style = document.documentElement.style,
Index: wp-includes/js/media-models.js
===================================================================
--- wp-includes/js/media-models.js	(revision 22857)
+++ wp-includes/js/media-models.js	(working copy)
@@ -235,9 +235,10 @@
 
 				// Set the action and ID.
 				options.data = _.extend( options.data || {}, {
-					action: 'save-attachment',
-					id:     this.id,
-					nonce:  media.model.settings.saveAttachmentNonce
+					action:  'save-attachment',
+					id:      this.id,
+					nonce:   media.model.settings.saveAttachmentNonce,
+					post_id: media.model.settings.postId
 				});
 
 				// Record the values of the changed attributes.
@@ -268,8 +269,9 @@
 			var model = this;
 
 			return media.post( 'save-attachment-compat', _.defaults({
-				id:     this.id,
-				nonce:  media.model.settings.saveAttachmentNonce
+				id:      this.id,
+				nonce:   media.model.settings.saveAttachmentNonce,
+				post_id: media.model.settings.postId
 			}, data ) ).done( function( resp, status, xhr ) {
 				model.set( model.parse( resp, xhr ), options );
 			});
@@ -609,7 +611,8 @@
 				options = options || {};
 				options.context = this;
 				options.data = _.extend( options.data || {}, {
-					action: 'query-attachments'
+					action:  'query-attachments',
+					post_id: media.model.settings.postId
 				});
 
 				// Clone the args so manipulation is non-destructive.
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 22857)
+++ wp-includes/script-loader.php	(working copy)
@@ -324,6 +324,7 @@
 		'settings' => array(
 			'saveAttachmentNonce' => wp_create_nonce( 'save-attachment' ),
 			'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ),
+			'postId'  => 0,
 		),
 	) );
 
