I am working with an iOS application in which i have to upload a selected image on dropbox. i am getting the url of image with its id as below-
assets-library://asset/asset.JPG?id=36BF5BC0-09A7-4F77-837D-460BD7DF2580&ext=JPG
now i have to upload that image by using this url of selected image.i am using the below method ,but i am not getting the right way to upload the image with incoming url::
NSString* filename = dropboximagepath; //i am storing the image url in dropboximagepath
NSString* destDir = @"";
NSString* srcPath = @"/";
[self.restClient uploadFile:filename toPath:destDir withParentRev:nil fromPath:srcPath];
please tell me that which filename & fromPath value i will use so that my image will upload on dropbox. thanks in advance.
I think you have the parameters backwards.
You should pass the local path to the file into the fromPath
parameter, so something like this:
[self.restClient uploadFile:@"photo.jpg"
toPath:@"/"
withParentRev:nil
fromPath:dropboximagepath];
This will create a file called "photo.jpg" in the root of the user's Dropbox.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.