我需要上传从iphone库中的图像,但我没有得到摄取的图像的路径 (使用图片选择器 )
在图片选择器的委托方法我在做以下
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
imageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
NSString *strImagePath = [info valueForKey:UIImagePickerControllerReferenceURL];
NSString *strImagePath1 = [info valueForKey:UIImagePickerControllerMediaURL];
NSLog(@"%@",strImagePath);
NSLog(@"%@",strImagePath1);
NSLog(@"%@",info);
}
和信息字典包含以下键值
{
UIImagePickerControllerMediaType = "public.image";
UIImagePickerControllerOriginalImage = "<UIImage: 0x16adc0>";
UIImagePickerControllerReferenceURL = "assets-library://asset/asset.PNG?id=1000000153&ext=PNG";
}
我用钥匙UIImagePickerControllerReferenceURL作为图像路径值将其上传到FTP,但我不能上传的文件,很可能这是我走的路径不正确。
任何人可以帮助我,我怎么能使用图像拾取采取摄取的图像的实际路径