diff --git a/src/popup-commands.c b/src/popup-commands.c
index 2896fb2..edc62c3 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -231,27 +231,83 @@ save_property_url_to_destination (EphyWindow *window,
 }
 
 static void
-response_cb (GtkDialog *dialog,
-	     int response_id,
-	     char *location)
+save_as_check_completion (EphyDownload *download)
+{
+	gboolean completed;
+	gchar *dest_uri;
+
+	completed = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (download), "completed"));
+	dest_uri = g_object_get_data (G_OBJECT (download), "save-as-uri");
+	if (completed && dest_uri) {
+		const char *source = ephy_download_get_destination_uri (download);
+		ephy_file_move_uri (source, dest_uri);
+		ephy_download_set_destination_uri (download, dest_uri);
+	}
+}
+
+static void
+save_as_completed_cb (EphyDownload *download)
+{
+	g_object_set_data (G_OBJECT (download), "completed", GINT_TO_POINTER (TRUE));
+	save_as_check_completion (download);
+}
+
+static void
+save_as_error_cb (EphyDownload *download,
+                  gint error_code,
+                  gint error_detail,
+                  char *reason)
+{
+	gtk_widget_destroy (ephy_download_get_widget (download));
+}
+
+static void
+save_as_response_cb (GtkDialog *dialog,
+                     int response_id,
+                     EphyDownload *download)
 {
 	if (response_id == GTK_RESPONSE_ACCEPT)
 	{
-		char *uri;
-		GtkWindow *window;
-
-		window = gtk_window_get_transient_for (GTK_WINDOW (dialog));
+		gchar *uri;
+		WebKitDownload *wk_download;
 
 		uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
-		save_property_url_to_destination (EPHY_WINDOW (window), location, uri);
-		g_free (uri);
+		g_object_set_data_full (G_OBJECT (download), "save-as-uri", uri, g_free);
+		save_as_check_completion (download);
+		wk_download = ephy_download_get_webkit_download (download);
+		webkit_download_set_destination (wk_download, uri);
+	}
+	else
+	{
+		ephy_download_cancel (download);
+		gtk_widget_destroy (ephy_download_get_widget (download));
 	}
-
-	g_free (location);
 	gtk_widget_destroy (GTK_WIDGET (dialog));
 }
 
 static void
+save_as_filename_suggested_cb (EphyDownload *download,
+                               char *suggested_filename,
+                               gchar *title)
+{
+	EphyFileChooser *dialog;
+	GtkWindow *window;
+
+	window = ephy_download_get_window (download);
+	dialog = ephy_file_chooser_new (title, GTK_WIDGET (window),
+					GTK_FILE_CHOOSER_ACTION_SAVE,
+					EPHY_FILE_FILTER_NONE);
+	g_free (title);
+	gtk_file_chooser_set_do_overwrite_confirmation
+			(GTK_FILE_CHOOSER (dialog), TRUE);
+	gtk_file_chooser_set_current_name
+			(GTK_FILE_CHOOSER (dialog), suggested_filename);
+	g_signal_connect (dialog, "response",
+			  G_CALLBACK (save_as_response_cb), download);
+	gtk_widget_show (GTK_WIDGET (dialog));
+}
+
+static void
 save_property_url (GtkAction *action,
 		   const char *title,
 		   EphyWindow *window,
@@ -270,23 +326,33 @@ save_property_url (GtkAction *action,
 
 	if (ask_dest)
 	{
-		EphyFileChooser *dialog;
-		char *base;
-
-		base = g_path_get_basename (location);
-		dialog = ephy_file_chooser_new (title, GTK_WIDGET (window),
-						GTK_FILE_CHOOSER_ACTION_SAVE,
-						EPHY_FILE_FILTER_NONE);
-
-		gtk_file_chooser_set_do_overwrite_confirmation
-				(GTK_FILE_CHOOSER (dialog), TRUE);
-		gtk_file_chooser_set_current_name
-				(GTK_FILE_CHOOSER (dialog), base);
-		g_signal_connect (dialog, "response",
-				  G_CALLBACK (response_cb), g_strdup (location));
-		gtk_widget_show (GTK_WIDGET (dialog));
-
-		g_free (base);
+		EphyDownload *download;
+		gchar *dest_dir;
+		gchar *dest_name;
+		gchar *dest_path;
+		gchar *dest_uri;
+
+		download = ephy_download_new_for_uri (location,
+					GTK_WINDOW (window));
+
+		dest_dir = ephy_file_get_downloads_dir ();
+		dest_name = ephy_file_tmp_filename ("ephy-download-XXXXXX", NULL);
+		dest_path = g_build_filename (dest_dir, dest_name, NULL);
+		dest_uri = g_filename_to_uri (dest_path, NULL, NULL);
+
+		ephy_download_set_destination_uri (download, dest_uri);
+
+		g_free (dest_dir);
+		g_free (dest_name);
+		g_free (dest_path);
+		g_free (dest_uri);
+
+		g_signal_connect (download, "filename-suggested",
+			G_CALLBACK (save_as_filename_suggested_cb), g_strdup (title));
+		g_signal_connect (download, "completed",
+			G_CALLBACK (save_as_completed_cb), NULL);
+		g_signal_connect (download, "error",
+			G_CALLBACK (save_as_error_cb), NULL);
 	}
 	else
 	{
