|
@@ -1603,33 +1603,10 @@
|
|
|
NSString *folderPhotos = [CCCoreData getCameraUploadFolderNamePathActiveAccount:app.activeAccount activeUrl:app.activeUrl];
|
|
|
NSString *directoryID = [CCCoreData getDirectoryIDFromServerUrl:serverUrl activeAccount:app.activeAccount];
|
|
|
|
|
|
- OCnetworking *ocNetworking = [[OCnetworking alloc] initWithDelegate:nil metadataNet:nil withUser:app.activeUser withPassword:app.activePassword withUrl:app.activeUrl isCryptoCloudMode:NO];
|
|
|
-
|
|
|
- // Create if request the folder for Photos
|
|
|
- if ((useSubFolder || [serverUrl isEqualToString:folderPhotos]) && [_serverUrl isEqualToString:serverUrl] == NO){
|
|
|
-
|
|
|
- if(![ocNetworking automaticCreateFolderSync:folderPhotos]) {
|
|
|
-
|
|
|
- [app messageNotification:@"_error_" description:@"_error_createsubfolders_upload_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeInfo];
|
|
|
-
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+ // Create if request the folder for Photos & if request the subfolders
|
|
|
+ if (![app createFolderSubFolderAutomaticUploadFolderPhotos:folderPhotos useSubFolder:useSubFolder assets:assets])
|
|
|
+ return;
|
|
|
|
|
|
- // Create if request the subfolders
|
|
|
- if (useSubFolder) {
|
|
|
-
|
|
|
- for (NSString *dateSubFolder in [CCUtility createNameSubFolder:assets]) {
|
|
|
-
|
|
|
- if(![ocNetworking automaticCreateFolderSync:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder]]) {
|
|
|
-
|
|
|
- [app messageNotification:@"_error_" description:@"_error_createsubfolders_upload_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeInfo];
|
|
|
-
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
NSLog(@"[LOG] Asset N. %lu", (unsigned long)[assets count]);
|
|
|
|
|
|
for (PHAsset *asset in assets) {
|