NSString *dateString= [self currentDateandTime];
//create file path and file name
NSString *docDirectory =
[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSString *pdfPath = [docDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"602_TW0023.%@_pdf.pdf",dateString]];
NSLog(@"Path: %@", pdfPath);
i converted an image to pdf and saved it with current date and time. How can i use this file to upload to ftp or php.
NSString* theFileName = [pdfPath lastPathComponent];
how to call above string into other method.can we set tag or what? i'm new to programming. point me right direction.
i tried a lot.
NSString *applicationDocumentsDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *filepath =[NSString stringWithFormat: @"%@/%@",applicationDocumentsDir, @"%@"];
NSData *uploadData = [NSData dataWithContentsOfFile: filepath];