{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1065","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1065/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1065/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1065/events","html_url":"https://github.com/swagger-api/swagger-ui/issues/1065","id":63948808,"number":1065,"title":"Allow file download dialog for cases of attachment response","user":{"login":"barneaoren","id":11270701,"avatar_url":"https://avatars.githubusercontent.com/u/11270701?v=3","gravatar_id":"","url":"https://api.github.com/users/barneaoren","html_url":"https://github.com/barneaoren","followers_url":"https://api.github.com/users/barneaoren/followers","following_url":"https://api.github.com/users/barneaoren/following{/other_user}","gists_url":"https://api.github.com/users/barneaoren/gists{/gist_id}","starred_url":"https://api.github.com/users/barneaoren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barneaoren/subscriptions","organizations_url":"https://api.github.com/users/barneaoren/orgs","repos_url":"https://api.github.com/users/barneaoren/repos","events_url":"https://api.github.com/users/barneaoren/events{/privacy}","received_events_url":"https://api.github.com/users/barneaoren/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swagger-api/swagger-ui/labels/Waiting%20for%20feedback","name":"Waiting for feedback","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-24T09:29:11Z","updated_at":"2015-05-04T18:42:51Z","closed_at":null,"body":"Hi there,\r\n\r\nSo, I have a server, and it is working pretty good with Swagger-UI.\r\n\r\nI have created a response handler for my server, for a GET request with no header parameters & for a unique path.\r\nThe response of this specific request contains the header \"Content-Disposition\" with the value of \"attachment; filename=\\\"main.c\\\"\" and with the body content of a \"hello-world\" program.\r\n\r\nIn case I'm performing a direct access via any browser, I'm getting the file download dialog properly.\r\nUnfortunately, once trying to perform the same action via the Swagger-UI, the response is being somehow \"down-graded\" to be a one without the \"Content-Disposition header, and only contains the \"Content-Type\" header.\r\nThe body message has being sent & received properly, but it is only being displayed at the response body part.\r\nI would like to issue a download dialog. I have tried to track the code location for such handler, but was unable to locate it.\r\n\r\nI know that it is currently not supported, but can anyone guide me please how to enable such operation?\r\n\r\nThanks in advance"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/comments/98809789","html_url":"https://github.com/swagger-api/swagger-ui/issues/1065#issuecomment-98809789","issue_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1065","id":98809789,"user":{"login":"barneaoren","id":11270701,"avatar_url":"https://avatars.githubusercontent.com/u/11270701?v=3","gravatar_id":"","url":"https://api.github.com/users/barneaoren","html_url":"https://github.com/barneaoren","followers_url":"https://api.github.com/users/barneaoren/followers","following_url":"https://api.github.com/users/barneaoren/following{/other_user}","gists_url":"https://api.github.com/users/barneaoren/gists{/gist_id}","starred_url":"https://api.github.com/users/barneaoren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barneaoren/subscriptions","organizations_url":"https://api.github.com/users/barneaoren/orgs","repos_url":"https://api.github.com/users/barneaoren/repos","events_url":"https://api.github.com/users/barneaoren/events{/privacy}","received_events_url":"https://api.github.com/users/barneaoren/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T18:42:50Z","updated_at":"2015-05-04T18:42:50Z","body":"@webron - Actually, I just saw the previous answer.\r\nI will be able to test it again only in 2 days.\r\n\r\n@fehguy - As far as I recall, the latest release should only support a download link (not dialog). also, trying to add a \"click\" even call to that link will be provided with 2 save dialogs popped to the user, as the function is being called twice (for the showResponseStatus and for the showErrorStatus). Both calls are being done no matter what was the response data.\r\n\r\nCurrenly, Im still using the previous version of Swagger-UI, with a specific hack for re-creating the content-disposition header & with a show dialog handler to overcome the \"double click\" issue (a global flag dedicated for requests with response data to be downloaded), but it wount really help to share it (it is very local and very simple add-on)."}}