|
@@ -216,7 +216,22 @@
|
|
|
|
|
|
NSString *fileName = [self.filesName objectAtIndex:0];
|
|
|
|
|
|
-// [[CCNetworking sharedNetworking] uploadFile:fileName serverUrl:_serverUrl assetLocalIdentifier:nil path:self.directoryUser session:k_upload_session_foreground taskStatus:k_taskStatusResume selector:@"" selectorPost:@"" errorCode:0 delegate:self];
|
|
|
+ tableMetadata *metadataForUpload = [tableMetadata new];
|
|
|
+
|
|
|
+ metadataForUpload.account = self.activeAccount;
|
|
|
+ metadataForUpload.date = [NSDate new];
|
|
|
+ metadataForUpload.directoryID = [[NCManageDatabase sharedInstance] getDirectoryID:self.serverUrl];
|
|
|
+ metadataForUpload.fileID = [metadataForUpload.directoryID stringByAppendingString:fileName];
|
|
|
+ metadataForUpload.fileName = fileName;
|
|
|
+ metadataForUpload.fileNameView = fileName;
|
|
|
+ metadataForUpload.path = self.directoryUser;
|
|
|
+ metadataForUpload.session = k_upload_session_foreground;
|
|
|
+ metadataForUpload.status = k_metadataStatusWaitUpload;
|
|
|
+
|
|
|
+ // Add Medtadata for upload
|
|
|
+ tableMetadata *metadata = [[NCManageDatabase sharedInstance] addMetadata:metadataForUpload];
|
|
|
+ // Upload
|
|
|
+ [[CCNetworking sharedNetworking] uploadFile:metadata path:self.directoryUser taskStatus:k_taskStatusResume delegate:self];
|
|
|
|
|
|
[self.hud visibleHudTitle:NSLocalizedString(@"_uploading_", nil) mode:MBProgressHUDModeDeterminate color:[NCBrandColor sharedInstance].brandElement];
|
|
|
}
|