Reputation: 812
I have managed to get my app to upload to Dropbox like so:
NSString *docsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
[self.restClient uploadFile:@"ZipTest.zip" toPath:[NSString stringWithFormat:@"/%@", self.dropboxFolderName] fromPath:docsPath];
But am now trying to verify it actually completed the upload. I know I can check for errors but how to check for completion?
I have tried using:`- (void)restClient:(DBRestClient*)client uploadProgress:(CGFloat)progress forFile:(NSString *)destPath from:(NSString *)srcPath {
Buut all I get is the number 1 printed even though I see on Dropbox the file has not completed the upload yet?
any ideas?
Thanks`
Upvotes: 1
Views: 737
Reputation: 3107
- (void)restClient:(DBRestClient *)client uploadedFile:(NSString *)srcPath {
NSString *filename = [[srcPath pathComponents]lastObject];
NSString *message = [NSString stringWithFormat:@"Uploaded File:%@",filename];
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Success"
message:message delegate:nil cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert show];
[alert release];
}
I used this code to check file is uploaded or not and after uploading this alert will show
Upvotes: 1