{"action":"closed","issue":{"url":"https://api.github.com/repos/ServiceStack/Issues/issues/253","labels_url":"https://api.github.com/repos/ServiceStack/Issues/issues/253/labels{/name}","comments_url":"https://api.github.com/repos/ServiceStack/Issues/issues/253/comments","events_url":"https://api.github.com/repos/ServiceStack/Issues/issues/253/events","html_url":"https://github.com/ServiceStack/Issues/issues/253","id":61038309,"number":253,"title":"Change name of downloaded csv file ","user":{"login":"jagjotocrex","id":10830010,"avatar_url":"https://avatars.githubusercontent.com/u/10830010?v=3","gravatar_id":"","url":"https://api.github.com/users/jagjotocrex","html_url":"https://github.com/jagjotocrex","followers_url":"https://api.github.com/users/jagjotocrex/followers","following_url":"https://api.github.com/users/jagjotocrex/following{/other_user}","gists_url":"https://api.github.com/users/jagjotocrex/gists{/gist_id}","starred_url":"https://api.github.com/users/jagjotocrex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagjotocrex/subscriptions","organizations_url":"https://api.github.com/users/jagjotocrex/orgs","repos_url":"https://api.github.com/users/jagjotocrex/repos","events_url":"https://api.github.com/users/jagjotocrex/events{/privacy}","received_events_url":"https://api.github.com/users/jagjotocrex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-13T11:00:46Z","updated_at":"2015-03-13T11:23:45Z","closed_at":"2015-03-13T11:23:45Z","body":"Hi,\r\n\r\nWe are facing issues in downloading a CSV file with customised name using the csv format of ServiceStack.\r\nIf we add Response Headers inorder to set the filename, we get an error of Multiple Content-Disposition.\r\nWe also tried using CsvSerializer method of ServiceStack.Text(v4.0.38), and file downloads but cannot be opened , it says File not found.\r\nCan you please suggest a way to download csv file with customised name?\r\n\r\nYour help will be appreciated.\r\n\r\nBelow is the sample code we have tried.\r\n\r\npublic void Get(DownloadApprovedData request)\r\n        {\r\n            try\r\n            {\r\n                var data = GetDataFromDB(request);\r\n                var fileName=\"NewFileName\";\r\n                Response.ContentType = \"text/csv\";\r\n                Response.AddHeader(\"Content-Disposition\", \"attachment; filename=\"+fileName + \" \" + DateTime.UtcNow.ToString(\"yyyy-MM-dd\") +\".csv\");\r\n\r\n                CsvSerializer.SerializeToStream(ProcessData(data), Response.OutputStream);\r\n               \r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                logger_.Debug(ex);\r\n                throw;\r\n            }\r\n        }"}}