2011-05-24 49 views
0

我想从uiimagepicker上传图像它是在imageview中返回图像。如何通过dropbox上传文件的方法传递imageView.image

现在我想将这张选中的图片上传到保管箱。我怎样才能做到这一点

我的代码是

- (IBAction)uploadButtonPressed:(id)sender { 

    [restClient uploadFile:@"Test.png" toPath:@"/" fromPath:imageview.image]; 

} 

这是给予警告,因为它采取的NSStringfromPath: 如何使用它的名字路过这里的形象?

回答

2

,您首先需要将图像保存到文档目录,那么所有的功能:

[restClient uploadFile:@"Test.png" toPath:@"/" fromPath:@"path/of/file/indocmentdirectory"]; 
+0

Ok.Means我应该使用UIImagePickercontrollersourcetypecamera,然后将其保存到文档目录? – iProgrammer 2011-05-24 12:23:40

+0

这将是正确的方式来使用此功能。 – rckoenes 2011-05-24 12:38:37

+0

非常感谢你 – iProgrammer 2011-05-24 12:43:00