我正在使用下面的代碼上傳進度,但如果我上傳4個圖像如何獲得個性化上傳進度。如何獲取上傳進度的多個分段上傳任務
Alamofire.upload(multipartFormData:{ multipartFormData in
multipartFormData.append(data, withName: alamoName, fileName: alamoFileName, mimeType: alamoMimeType)
for (key, value) in parameters {
multipartFormData.append(value.data(using: String.Encoding.utf8)!, withName: key)
}
},to:requestUrl){ (result) in
switch result {
case .success(let upload, _,_):
upload.uploadProgress(closure: { (progress) in
print("Upload Progress:%d", progress)
})
upload.responseJSON { response in
if(response.result.value != nil){
let uploadResponse = response.result.value as! Dictionary <String ,Any>
self.didUpdateResponse(sender: uploadResponse)
}
}
case .failure(let encodingError):
print(encodingError)
}
看到這個https://github.com/Alamofire/Alamofire/issues/1652#issuecomment-259020449 –
看到這個也https://github.com/Alamofire/Alamofire/issues/989 –