簡體   English   中英

如何在iPhone的保管箱中上傳文件?

[英]How to upload file in dropbox in iphone?

我已經編寫了將圖像從文檔目錄上傳到Dropbox樣本相冊的代碼。 但這並沒有按照我的意願工作。

我的代碼:

 -(NSString *)getDocumentPath{

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSString *path = [[paths objectAtIndex:0]stringByAppendingPathComponent:@"image1.jpg"];
NSLog(@"path:%@",path);
return path;
}


-(IBAction)uplaodingPhotos:(id)sender
{
  NSString *path = [self getDocumentPath];
    [[self restClient] uploadFile:@"splash.jpg" toPath:@"/Photos/Sample Album"
                withParentRev:nil fromPath:path]; 

}

在此代碼中,我想將圖像image1從文檔目錄添加到Dropbox中的Sample Album。 但是它不會復制圖像。現在我該怎么辦?

請幫忙。 預先感謝。

首先,您需要確保已與Dropbox會話建立連接,並且其余客戶端不是無效的。

有關更多信息,請檢查URL: https : //www.dropbox.com/developers/start/authentication#ios

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM