2011-05-24 68 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