{"action":"created","issue":{"url":"https://api.github.com/repos/Alamofire/Alamofire/issues/2017","repository_url":"https://api.github.com/repos/Alamofire/Alamofire","labels_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/2017/labels{/name}","comments_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/2017/comments","events_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/2017/events","html_url":"https://github.com/Alamofire/Alamofire/issues/2017","id":214484388,"number":2017,"title":"Can't Download PDFs","user":{"login":"bkhosh2","id":7614032,"avatar_url":"https://avatars3.githubusercontent.com/u/7614032?v=3","gravatar_id":"","url":"https://api.github.com/users/bkhosh2","html_url":"https://github.com/bkhosh2","followers_url":"https://api.github.com/users/bkhosh2/followers","following_url":"https://api.github.com/users/bkhosh2/following{/other_user}","gists_url":"https://api.github.com/users/bkhosh2/gists{/gist_id}","starred_url":"https://api.github.com/users/bkhosh2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkhosh2/subscriptions","organizations_url":"https://api.github.com/users/bkhosh2/orgs","repos_url":"https://api.github.com/users/bkhosh2/repos","events_url":"https://api.github.com/users/bkhosh2/events{/privacy}","received_events_url":"https://api.github.com/users/bkhosh2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-15T18:28:15Z","updated_at":"2017-03-16T18:05:31Z","closed_at":null,"body":" I am trying to download PDFs to the documents directory. The request is successful, but the file doesn't exist in the documents directory after the request is finished.\r\n\r\n    let destination = DownloadRequest.suggestedDownloadDestination(for: .documentDirectory)\r\n\r\n    let documentsDirectory = FileManager.SearchPathDirectory.documentDirectory\r\n    let userDomainMask = FileManager.SearchPathDomainMask.userDomainMask\r\n    let paths = NSSearchPathForDirectoriesInDomains(documentsDirectory, userDomainMask, true)\r\n\r\n    if paths.first != nil \r\n    {\r\n\r\n        Alamofire.download(\"http://www.test.com/pdfs/sample.pdf\", to: destination).responseData \r\n        { response in\r\n            if response.result.isFailure\r\n            {\r\n                print(\"\\(response.error!)\")\r\n            }\r\n        }\r\n    }"},"comment":{"url":"https://api.github.com/repos/Alamofire/Alamofire/issues/comments/287143345","html_url":"https://github.com/Alamofire/Alamofire/issues/2017#issuecomment-287143345","issue_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/2017","id":287143345,"user":{"login":"bkhosh2","id":7614032,"avatar_url":"https://avatars3.githubusercontent.com/u/7614032?v=3","gravatar_id":"","url":"https://api.github.com/users/bkhosh2","html_url":"https://github.com/bkhosh2","followers_url":"https://api.github.com/users/bkhosh2/followers","following_url":"https://api.github.com/users/bkhosh2/following{/other_user}","gists_url":"https://api.github.com/users/bkhosh2/gists{/gist_id}","starred_url":"https://api.github.com/users/bkhosh2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkhosh2/subscriptions","organizations_url":"https://api.github.com/users/bkhosh2/orgs","repos_url":"https://api.github.com/users/bkhosh2/repos","events_url":"https://api.github.com/users/bkhosh2/events{/privacy}","received_events_url":"https://api.github.com/users/bkhosh2/received_events","type":"User","site_admin":false},"created_at":"2017-03-16T18:05:31Z","updated_at":"2017-03-16T18:05:31Z","body":"I apologize. This was a false alarm. The code works perfectly. I just had some code that prematurely deleted the files."}}
{"actor":{"display_login":"bkhosh2"}}