I need to upload a file to a specific folder in Google Drive using the iOS app. I know the name of the folder, but in order to upload it to a specific folder, I also need to specify an identifier for this folder. Here is the part of my code where I hardcoded the identifier for the destination folder. So my questions are: how can I find the destination folder identifier programmatically.
NSString *mimeType = @"image/png"; NSData *imageData = UIImagePNGRepresentation(imageView.image); GTLUploadParameters *uploadParameters = [GTLUploadParameters uploadParametersWithData:imageData MIMEType:mimeType]; GTLDriveFile *fileObj = [GTLDriveFile object]; fileObj.title = @"this_is_a_test.png"; GTLDriveParentReference *parentRef = [GTLDriveParentReference object]; parentRef.identifier = @"0B1Em3SqS0WHrQi15SHB4OHRGd2c"; fileObj.parents = [NSArray arrayWithObject:parentRef];
source share