#17755: Export data should download file.

--HG--
branch : 1.x
This commit is contained in:
Suha Can
2011-05-09 14:43:28 -07:00
parent a976b38388
commit 8d1b1d6325

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Orchard.ContentManagement.MetaData;
using Orchard.ImportExport.Services;
@@ -77,7 +78,7 @@ namespace Orchard.ImportExport.Controllers {
var exportFilePath = _importExportService.Export(contentTypesToExport, exportOptions);
Services.Notifier.Information(T("Your export file has been created at {0}", exportFilePath));
return RedirectToAction("Export");
return File(exportFilePath, "text/xml", "export.xml");
}
catch (Exception exception) {
Services.Notifier.Error(T("Export failed: {0}", exception.Message));