Reputation: 21
I am storing some videos in the custom folder which is created with the help of Alasset library in device . Videos are storing in custom folder successfully. I want to get the path / url of that particular folder.
Can someone tell me the way to get the path/url for the custom folder that we created programmatically with the help of Alasset library.
I search a lot about this.But google always provide solution with document directory. I don't want the path of document directory. But the path of actual folder created in my device. This problem takes my so much of time to solve. Please someone help me.
Upvotes: 1
Views: 594
Reputation: 649
Try this code,
This code will give you the url where the file is stored.
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library writeImageToSavedPhotosAlbum:[viewImage CGImage] orientation:(ALAssetOrientation)[viewImage imageOrientation] completionBlock:^(NSURL *assetURL, NSError *error){
if (error) {
NSLog(@"error");
} else {
NSLog(@"url %@", assetURL);
}
}];
Upvotes: 1