huangxiaodong 1 år sedan
förälder
incheckning
ab90fd8da4

+ 6 - 1
创维盒子/双子星云手机/NAS/nasUploadManager/nasMixUploadManager.m

@@ -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)

+ 6 - 3
创维盒子/双子星云手机/NAS/nasUploadManager/nasUploadFileManager.m

@@ -288,6 +288,8 @@
 #pragma mark 更新数据状态
 - (void)nasUploadFileChangeingOneFileFunBy:(uploadFileDataModel*)dataModel
 {
+    //test code
+    //return;
     
     if(dataModel.curUploadStateType == uploadStateDone){
         [self handleDatabaseArrDeleteObjectInUploading:dataModel];
@@ -316,9 +318,10 @@
     }];
         
     
-    if(!_isSuspendType || dataModel.curUploadStateType != uploadStateSuspend){
-        [[NSNotificationCenter defaultCenter] postNotificationName:uploadFileRefreshNotification object:dataModel];
-    }
+//    if(!_isSuspendType || dataModel.curUploadStateType != uploadStateSuspend){
+//        HLog(@"nasUploadFileChangeingOneFileFunBy uploadFileRefreshNotification")
+//        [[NSNotificationCenter defaultCenter] postNotificationName:uploadFileRefreshNotification object:dataModel];
+//    }
     
 }