marinofaggiana 5 年之前
父節點
當前提交
ca73de01fc
共有 2 個文件被更改,包括 9 次插入1 次删除
  1. 4 1
      iOSClient/CCGlobal.h
  2. 5 0
      iOSClient/Networking/CCNetworking.m

+ 4 - 1
iOSClient/CCGlobal.h

@@ -320,9 +320,12 @@
 // Notification Center
 
 #define k_notificationCenter_changeTheming              @"changeTheming"
-#define k_notificationCenter_deleteMetadata             @"deleteMetadata"
 #define k_notificationCenter_splitViewChangeDisplayMode @"splitViewChangeDisplayMode"
 
+#define k_notificationCenter_uploadFile                 @"uploadFile"
+#define k_notificationCenter_downloadFile               @"downloadFile"
+#define k_notificationCenter_deleteMetadata             @"deleteMetadata"
+
 
 // -----------------------------------------------------------------------------------------------------------
 // INTERNAL

+ 5 - 0
iOSClient/Networking/CCNetworking.m

@@ -1173,6 +1173,10 @@
         }
 #ifndef EXTENSION
         
+        // NSNotificationCenter
+        NSDictionary* userInfo = @{@"metadata": metadata};
+        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_uploadFile object:nil userInfo:userInfo];
+        
         // EXIF
         if ([metadata.typeFile isEqualToString: k_metadataTypeFile_image])
             [[CCExifGeo sharedInstance] setExifLocalTableEtag:metadata];
@@ -1232,6 +1236,7 @@
                 }
             });
         });
+        
     } else {
         
         if ([self.delegate respondsToSelector:@selector(uploadFileSuccessFailure:ocId:assetLocalIdentifier:serverUrl:selector:errorMessage:errorCode:)]) {