|
@@ -2331,6 +2331,27 @@
|
|
}];
|
|
}];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+- (void)storeEndToEndMetadata:(NSString*)serverPath fileID:(NSString *)fileID metadata:(NSString *)metadata onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer))successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest {
|
|
|
|
+
|
|
|
|
+ serverPath = [serverPath stringByAppendingString:k_url_client_side_encryption];
|
|
|
|
+ serverPath = [NSString stringWithFormat:@"%@/meta-data/%@", serverPath, fileID];
|
|
|
|
+ serverPath = [serverPath encodeString:NSUTF8StringEncoding];
|
|
|
|
+
|
|
|
|
+ OCWebDAVClient *request = [[OCWebDAVClient alloc] init];
|
|
|
|
+ request = [self getRequestWithCredentials:request];
|
|
|
|
+
|
|
|
|
+ [request storeEndToEndMetadata:serverPath metadata:metadata onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
|
|
|
|
+
|
|
|
|
+ //Return success
|
|
|
|
+ successRequest(response, request.redirectedServer);
|
|
|
|
+
|
|
|
|
+ } failure:^(NSHTTPURLResponse *response, NSData *responseData, NSError *error) {
|
|
|
|
+
|
|
|
|
+ //Return error
|
|
|
|
+ failureRequest(response, error, request.redirectedServer);
|
|
|
|
+ }];
|
|
|
|
+}
|
|
|
|
+
|
|
#pragma mark - Clear Cache
|
|
#pragma mark - Clear Cache
|
|
|
|
|
|
- (void)eraseURLCache
|
|
- (void)eraseURLCache
|
|
@@ -2339,7 +2360,6 @@
|
|
[[NSURLCache sharedURLCache] setDiskCapacity:0];
|
|
[[NSURLCache sharedURLCache] setDiskCapacity:0];
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
#pragma mark - Utils
|
|
#pragma mark - Utils
|
|
|
|
|
|
- (void) addUserItemOfType:(NSInteger) shareeType fromArray:(NSArray*) usersArray ToList: (NSMutableArray *) itemList
|
|
- (void) addUserItemOfType:(NSInteger) shareeType fromArray:(NSArray*) usersArray ToList: (NSMutableArray *) itemList
|