Эх сурвалжийг харах

Unable to upload files from iOS when file is in iCloud #436

Marino Faggiana 7 жил өмнө
parent
commit
cdc5a180df

+ 4 - 2
iOSClient/AppDelegate.m

@@ -1472,15 +1472,17 @@
     
     // ------------------------- <selector Auto Upload All> ----------------------
     
-    // Verify num error MAX 10 after STOP
+    // Verify num error k_maxErrorAutoUploadAll after STOP (100)
     NSArray *metadatas = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND sessionSelector = %@ AND sessionTaskIdentifier = %i", _activeAccount, selectorUploadAutoUploadAll, k_taskIdentifierError] sorted:nil ascending:NO];
     
     NSInteger errorCount = [metadatas count];
     
-    if (errorCount >= 10) {
+    if (errorCount >= k_maxErrorAutoUploadAll) {
         
         [self messageNotification:@"_error_" description:@"_too_errors_automatic_all_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:0];
         
+        [[NCManageDatabase sharedInstance] addActivityClient:@"" fileID:@"" action:k_activityDebugActionAutoUpload selector:selectorUploadAutoUploadAll note:@"_too_errors_automatic_all_" type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:_activeUrl];
+
     } else {
         
         if (counterUploadInSessionAndInLock < maxConcurrentDownloadUpload && counterUploadInLock < 1) {

+ 2 - 0
iOSClient/CCGlobal.h

@@ -57,6 +57,8 @@ extern NSString *const flowEndpoint;
 
 #define k_daysOfActivity                                7
 
+#define k_maxErrorAutoUploadAll                         100
+
 #define k_returnCreateFolderPlain                       0
 #define k_returnCreateFotoVideoPlain                    1
 #define k_returnCreateFilePlain                         2