Problem in downloading Folder with dropbox api

我是研究僧i 提交于 2019-12-07 12:59:02

问题


I am using Dropbox api and tried to download folder but it is not working. I am able to download any type of file but not entire folder ..Here is my code which I used to download file

NSLog(@"called");

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

    NSString *file = [NSString stringWithFormat:@"/%@",[metaArray objectAtIndex:indexPath.row]]; 

    //NSString *file = @"/Photos";
    NSString *path = [NSString stringWithFormat:@"%@/Downloaded Data/%@", [paths objectAtIndex:0],file];

    //NSString *str = [NSString stringWithFormat:@"%@/Downloaded Data",path];

    [self.restClient loadFile:file intoPath:path];

    NSLog(@"Downloaded");

please help


回答1:


Load the directory metadata, then load the files that it references, see post for code.




回答2:


I'm facing the same problem as you are,

and the error log I got is that "local folder not exist" even if I already create the folder by myself

I think that the "DBRestClient" is only the "single file" downloader?

"NOT" the folder sync object

now I'm trying to use the sync API to sync target folder

sync API address....

https://www.dropbox.com/developers/sync/start/ios


thinking about that...if the "DBRestClient" can download whole folder files....

the sync API is useless....if you use like

[_restClient loadMetadata:@"/"];

cheers!



来源:https://stackoverflow.com/questions/6122800/problem-in-downloading-folder-with-dropbox-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!