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