cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iOS SDK not uploading to folder path

iOS SDK not uploading to folder path

Ron B.15
New member | Level 1

I'm using "restClient.uploadFile(file, toPath: destPath, withParentRev: nil, fromPath: sourcePath)", where file="someFileName", destPath="somePathOnMyDropboxAccount", and sourcePath="someLocalFilePath". But instead of the file uploading to the designated path, it uploads to "file/file", creating a folder of the same name as the file on my Dropbox root folder.

What I wanted to happen was to upload my file to a specific folder (that may or may not exist). How do I do that?

 

2 Replies 2

Greg-DB
Dropbox Staff

Can you post your actual code, including the real values for these variables, and the output? It's hard to follow using the example values.

Also, there's some sample code for this in the tutorial:

https://www.dropbox.com/developers/core/start/ios#uploading

Ron B.15
New member | Level 1

Unfortunately, the example you cited in the tutorial shows how to upload to the root directory. That isn't the problem I'm having. I needed to know how to upload to something other than the root directory.

Through process of elimination, I figured out that I need to include the "/" prefix to my 'toPath:' parameter. Any path components before the "/" are apparently ignored.

Thanks for your help anyway.

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Ron B.15 New member | Level 1
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?