瀏覽代碼

[PR #1722] Update README for proper error checking in download.

Jon Shier 9 年之前
父節點
當前提交
2034f4c872
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -623,7 +623,7 @@ let destination: DownloadRequest.DownloadFileDestination = { _, _ in
 Alamofire.download(urlString, to: destination).response { response in
     print(response)
 
-	if response.result.isSuccess, let imagePath = response.destinationURL?.path {
+	if response.error == nil, let imagePath = response.destinationURL?.path {
 	    let image = UIImage(contentsOfFile: imagePath)
 	}
 }