Marino Faggiana 6 rokov pred
rodič
commit
bdedab39d7

+ 0 - 1
iOSClient/AppDelegate.m

@@ -963,7 +963,6 @@
     
     NCCreateMenuAdd *menuAdd = [[NCCreateMenuAdd alloc] initWithThemingColor:[NCBrandColor sharedInstance].brandElement];
     [menuAdd createMenuWithViewController:self.window.rootViewController view:view];
-    //[menuAdd createMenuWithView:view];
 }
 
 - (void)selectedTabBarController:(NSInteger)index

+ 11 - 5
iOSClient/Library/OCCommunicationLib/OCCommunication.m

@@ -2889,11 +2889,17 @@
         NSDictionary *jsongParsed = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];
         NSLog(@"[LOG] URL Asset : %@",jsongParsed);
         
-        if (jsongParsed && jsongParsed.allKeys > 0) {
-            
-            NSString *url = [jsongParsed valueForKey:@"url"];
-            successRequest(response, url, request.redirectedServer);
-            
+        NSDictionary *ocs = [jsongParsed valueForKey:@"ocs"];
+        NSDictionary *meta = [ocs valueForKey:@"meta"];
+        NSDictionary *data = [ocs valueForKey:@"data"];
+        
+        NSInteger statusCode = [[meta valueForKey:@"statuscode"] integerValue];
+        
+        if (statusCode == kOCUserProfileAPISuccessful) {            
+            if ([data valueForKey:@"url"] && ![[data valueForKey:@"url"] isKindOfClass:[NSNull class]])
+                successRequest(response, [data valueForKey:@"url"], request.redirectedServer);
+            else
+                successRequest(response, nil, request.redirectedServer);
         } else {
             failureRequest(response, [UtilsFramework getErrorWithCode:k_CCErrorWebdavResponseError andCustomMessageFromTheServer:NSLocalizedString(@"_server_response_error_", nil)], request.redirectedServer);
         }

+ 3 - 1
iOSClient/Main/Create cloud/NCCreateFormUploadRichdocuments.swift

@@ -257,7 +257,9 @@ class NCCreateFormUploadRichdocuments: XLFormViewController, NCSelectDelegate, U
         let ocNetworking = OCnetworking.init(delegate: nil, metadataNet: nil, withUser: appDelegate.activeUser, withUserID: appDelegate.activeUserID, withPassword: appDelegate.activePassword, withUrl: appDelegate.activeUrl)
         
         ocNetworking?.createNewRichdocuments(withFileName: fileName, serverUrl: serverUrl, templateID: "\(selectTemplate.templateID)", success: { (path) in
-            
+            if path != nil && path!.count > 0 {
+                print("x")
+            }
         }, failure: { (message, errorCode) in
             self.appDelegate.messageNotification("_error_", description: message, visible: true, delay: TimeInterval(k_dismissAfterSecond), type: TWMessageBarMessageType.error, errorCode: errorCode)
         })