3
我需要發送帶參數的文件並跟蹤上傳進度。方法Alamofire上傳進度
Alamofire.request(.POST, "http://httpbin.org/post", parameters: parameters, encoding: .JSON)
不跟蹤進度上傳。方法
Alamofire.upload(.POST, "http://httpbin.org/post", file: fileURL)
.progress { (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) in
println(totalBytesWritten)
}
.responseJSON { (request, response, JSON, error) in
println(JSON)
}
不能設置參數
是可以發送與參數和跟蹤上傳進度的文件?
http://stackoverflow.com/a/26153191/1702413 – TonyMkenu 2014-10-23 07:15:48
http://stackoverflow.com/questions/26121827/uploading-file-with-parameters-using-alamofire/26747857#26747857 – antiblank 2014-11-11 18:29:00