|
@@ -1112,7 +1112,7 @@
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- NSString *e2eMetadataJSON = nil;
|
|
|
+ __block NSString *e2eMetadataJSON = nil;
|
|
|
|
|
|
// *** IS ENCRYPTED ---> CREATE METADATA ***
|
|
|
if ([CCUtility isFolderEncrypted:serverUrl account:_activeAccount]) {
|
|
@@ -1124,6 +1124,9 @@
|
|
|
if (!e2eMetadataJSON) {
|
|
|
[[NCManageDatabase sharedInstance] addActivityClient:fileName fileID:assetLocalIdentifier action:k_activityDebugActionUpload selector:selector note:@"Serious internal error to encoding metadata" type:k_activityTypeFailure verbose:k_activityVerboseHigh activeUrl:_activeUrl];
|
|
|
[[NCManageDatabase sharedInstance] setMetadataSession:session sessionError:@"Serious internal error to encoding metadata" sessionSelector:nil sessionSelectorPost:nil sessionTaskIdentifier:k_taskIdentifierError predicate:[NSPredicate predicateWithFormat:@"sessionID = %@ AND account = %@", sessionID, _activeAccount]];
|
|
|
+
|
|
|
+ [[NCManageDatabase sharedInstance] deleteQueueUploadWithAssetLocalIdentifier:assetLocalIdentifier selector:selector];
|
|
|
+ [uploadTask cancel];
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -1133,11 +1136,15 @@
|
|
|
// *** IS e2eMetadataJSON ---> SEND METADATA ***
|
|
|
if (e2eMetadataJSON) {
|
|
|
if ([self SendEndToEndMetadata:e2eMetadataJSON serverUrl:serverUrl] == false) {
|
|
|
+
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
[[NCManageDatabase sharedInstance] addActivityClient:fileName fileID:assetLocalIdentifier action:k_activityDebugActionUpload selector:selector note:@"Error to send metadata" type:k_activityTypeFailure verbose:k_activityVerboseHigh activeUrl:_activeUrl];
|
|
|
[[NCManageDatabase sharedInstance] setMetadataSession:session sessionError:@"Error to send metadata" sessionSelector:nil sessionSelectorPost:nil sessionTaskIdentifier:k_taskIdentifierError predicate:[NSPredicate predicateWithFormat:@"sessionID = %@ AND account = %@", sessionID, _activeAccount]];
|
|
|
- return;
|
|
|
+ [[NCManageDatabase sharedInstance] deleteQueueUploadWithAssetLocalIdentifier:assetLocalIdentifier selector:selector];
|
|
|
+ [uploadTask cancel];
|
|
|
});
|
|
|
+
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
|