How to upload image, which is not saved on the device to the dropbox account?(IOS)

倾然丶 夕夏残阳落幕 提交于 2019-12-03 21:05:27

you will have to call DBRestClient methods from the main thread or a thread that has a run loop. Otherwise the delegate methods will not be called.

what you will have to do is first alloc init yoir DBRestClient object then make it's delegate self and then you can easily upload your file.below is an example

NSString *destDir = @"/";
restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
restClient.delegate = self;

[restClient uploadFile:yourfilename toPath:destDir withParentRev:nil fromPath:sourcepath];

Happy Coding!!!!!!

You can't save into the bundle. You should use documents or cache folder:

 NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!