- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editInfo {
userURL = [editInfo objectForKey:UIImagePickerControllerMediaURL];
userImage = image;
userImageView.image=userImage;
[self dismissViewControllerAnimated:YES completion:nil];}
然後我去NSURL userURL,並把它放在一個UIActivityViewController用來上傳圖片。然而,這永遠不會奏效,並且總是像它試圖上傳(空)失敗。然而,包括在Xcode項目,當我使用預設的圖像和下面的代碼,它總是工作,並上傳正確:NSURL返回(空)
NSURL *url = [[NSBundle mainBundle] URLForResource:@"kitten.jpg" withExtension:nil];
如果有幫助,我使用https://github.com/goosoftware/GSDropboxActivity
當我使用UIImagePickerControllerReferenceURL代替UIImagePickerControllerMediaURL,我得到以下錯誤: [警告] DropboxSDK:文件不存在(/asset.JPG) 無法上載assets-library://asset/asset.JPG?id = EECAF4D0-A5ED-40E7-8E6F -3A586C0AB06E & EXT = JPG
,有人嗎?請我真的需要幫助... – user1413558