|
|
@@ -315,6 +315,10 @@
|
|
|
NSData *curData = operation.fileModel.imageData;
|
|
|
operation.onceDataLengt = [curData length];
|
|
|
|
|
|
+ if(operation.fileModel.totalBytes == 0){//异常处理
|
|
|
+ operation.fileModel.totalBytes = operation.onceDataLengt;
|
|
|
+ }
|
|
|
+
|
|
|
[self startUpload:paraDict operation:operation data:curData success:^(id _Nonnull responseObject) {
|
|
|
frpUploadModel *model = [[frpUploadModel alloc] initWithDictionary:responseObject error:nil];
|
|
|
if(model && model.position == operation.fileModel.totalBytes){
|
|
|
@@ -322,7 +326,8 @@
|
|
|
[weakSelf handleUploadDoneOneFileBy:operation];
|
|
|
}
|
|
|
else{
|
|
|
- HLog(@"%@上传完成一片 %ld",operation.fileModel.filename,model.position)
|
|
|
+ HLog(@"%@上传完成异常 %ld---%ld",operation.fileModel.filename,model.position,operation.fileModel.totalBytes)
|
|
|
+ [weakSelf handleUploadDoneOneFileBy:operation];
|
|
|
}
|
|
|
} faild:^(NSError * _Nonnull error) {
|
|
|
HLog(@"%@上传失败",operation.fileModel.filename)
|