{"action":"created","issue":{"url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/425","repository_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs","labels_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/425/labels{/name}","comments_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/425/comments","events_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/425/events","html_url":"https://github.com/OneDrive/onedrive-api-docs/issues/425","id":170417880,"number":425,"title":"How to Download selected file after click on \"Open\" button","user":{"login":"Sanjeev143","id":14105562,"avatar_url":"https://avatars.githubusercontent.com/u/14105562?v=3","gravatar_id":"","url":"https://api.github.com/users/Sanjeev143","html_url":"https://github.com/Sanjeev143","followers_url":"https://api.github.com/users/Sanjeev143/followers","following_url":"https://api.github.com/users/Sanjeev143/following{/other_user}","gists_url":"https://api.github.com/users/Sanjeev143/gists{/gist_id}","starred_url":"https://api.github.com/users/Sanjeev143/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sanjeev143/subscriptions","organizations_url":"https://api.github.com/users/Sanjeev143/orgs","repos_url":"https://api.github.com/users/Sanjeev143/repos","events_url":"https://api.github.com/users/Sanjeev143/events{/privacy}","received_events_url":"https://api.github.com/users/Sanjeev143/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"daboxu","id":3971919,"avatar_url":"https://avatars.githubusercontent.com/u/3971919?v=3","gravatar_id":"","url":"https://api.github.com/users/daboxu","html_url":"https://github.com/daboxu","followers_url":"https://api.github.com/users/daboxu/followers","following_url":"https://api.github.com/users/daboxu/following{/other_user}","gists_url":"https://api.github.com/users/daboxu/gists{/gist_id}","starred_url":"https://api.github.com/users/daboxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daboxu/subscriptions","organizations_url":"https://api.github.com/users/daboxu/orgs","repos_url":"https://api.github.com/users/daboxu/repos","events_url":"https://api.github.com/users/daboxu/events{/privacy}","received_events_url":"https://api.github.com/users/daboxu/received_events","type":"User","site_admin":false},"assignees":[{"login":"daboxu","id":3971919,"avatar_url":"https://avatars.githubusercontent.com/u/3971919?v=3","gravatar_id":"","url":"https://api.github.com/users/daboxu","html_url":"https://github.com/daboxu","followers_url":"https://api.github.com/users/daboxu/followers","following_url":"https://api.github.com/users/daboxu/following{/other_user}","gists_url":"https://api.github.com/users/daboxu/gists{/gist_id}","starred_url":"https://api.github.com/users/daboxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daboxu/subscriptions","organizations_url":"https://api.github.com/users/daboxu/orgs","repos_url":"https://api.github.com/users/daboxu/repos","events_url":"https://api.github.com/users/daboxu/events{/privacy}","received_events_url":"https://api.github.com/users/daboxu/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-08-10T13:32:42Z","updated_at":"2016-08-10T18:17:29Z","closed_at":null,"body":"Hi,\r\nI am using the code below on button click calling the function `launchOneDrivePicker()` , when i call it the file picker is popup in new window and  i am  able to select or  choose the file.  \r\n```\r\n <div>\r\n<button type=\"button\" onclick=\"launchOneDrivePicker();\">**launchOneDrivePicker**</button>\r\n </div>\r\nfunction launchOneDrivePicker() {\r\n    var odOptions = {\r\n        clientId: \"###############################\",\r\n        action: \"download\",\r\n        multiSelect: true,\r\n        openInNewWindow: true,\r\n        advanced: {\r\n            redirectUri: \"https://login.live.com/oauth20_authorize.srf?client_id=*****************&scope=onedrive_onetime.access:readfiles|single|downloadLink&response_type=code&redirect_uri=https://localhost/Onedrive/WebForm1.aspx\"\r\n        },\r\n        success: function (files) { download(); },\r\n        cancel: function () { /* cancel handler */ },\r\n        error: function (e) { /* error handler */ },  \r\n    };\r\n    OneDrive.open(odOptions);  \r\n}\r\n```\r\n\r\nNow my **Question  is  that  How can i  download  the  selected file after click the  Open button as mention in  screen shot below:**\r\n![issue](https://cloud.githubusercontent.com/assets/14105562/17555103/d5b3fd88-5f2b-11e6-9378-216576269ce7.PNG)\r\n\r\nI am going through the link below:\r\n[https://msdn.microsoft.com/en-us/library/hh550839.aspx](url) \r\nbut i am not able to  download the file I called the download  function in success  function but there i am not able to download  please share some  reference or query how  can i achieve this.\r\nThanks.  "},"comment":{"url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/comments/238955484","html_url":"https://github.com/OneDrive/onedrive-api-docs/issues/425#issuecomment-238955484","issue_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/425","id":238955484,"user":{"login":"Sanjeev143","id":14105562,"avatar_url":"https://avatars.githubusercontent.com/u/14105562?v=3","gravatar_id":"","url":"https://api.github.com/users/Sanjeev143","html_url":"https://github.com/Sanjeev143","followers_url":"https://api.github.com/users/Sanjeev143/followers","following_url":"https://api.github.com/users/Sanjeev143/following{/other_user}","gists_url":"https://api.github.com/users/Sanjeev143/gists{/gist_id}","starred_url":"https://api.github.com/users/Sanjeev143/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sanjeev143/subscriptions","organizations_url":"https://api.github.com/users/Sanjeev143/orgs","repos_url":"https://api.github.com/users/Sanjeev143/repos","events_url":"https://api.github.com/users/Sanjeev143/events{/privacy}","received_events_url":"https://api.github.com/users/Sanjeev143/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T18:17:29Z","updated_at":"2016-08-10T18:17:29Z","body":"@daboxu : thanks for the  response, i follow the same url in my web app and use the sdk below:\r\n `<html>\r\n<script type=\"text/javascript\" src=\"https://js.live.net/v7.0/OneDrive.js\"></script>\r\n</html>`\r\n\r\nbut when i am trying to call simple alert() function in success:\r\n`success: function (files) { alert(\"Response on success\"); }`, \r\ni am not able to get any response  by alert that means it doesn't work. so how can i fire the success method. As per the documentation success function is called when file is opened or uploaded but in my case i didn't get the response at all. please see the code that i have mention in my question above  ance again thanks for the response.\r\n"}}
{"actor":{"display_login":"Sanjeev143"}}