You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

FYVE's avatar
FYVE
Explorer | Level 3
7 years ago

Obj-C Trying to upload but am having some issues

Hello,

 

I'm trying to upload files from my app but entering in my fileURLWithPath code doesn't seem to work. It keeps saying the file doesn't exist. I read the exact path in the console and pasted it in but it still can't find the file. 

That is trying the batchUpload.

 

I'm getting this error:

No visible @interface for 'DBFILESUserAuthRoutes' declares the selector 'uploadData:mode:autorename:clientModified:mute:propertyGroups:inputData:'

When I try using the first method in the documentation. Any help with this would be amazing... I can't sort it out.

 

Also, is there a way to upload/download all files of a certain type from a folder? Like if I wanted to upload/download all .sav files for example. Is this possible?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Regarding the first issue, with the file not being found, we'd need more information to be able to offer help. If you're still having trouble with that, please share the full steps and code to reproduce the issue. 

    Regarding the second issue, with the uploadData method not being found, that selector looks correct. What version number of the SDK do you have installed though? It sounds like you may have an older version without that method definition. Make sure you're using the latest version, currently v3.9.1.

    And regarding the last question, the Dropbox API doesn't offer an automatic way to do that, but you can certainly list the contents of the folder, filter the results to the desired entries (i.e., based on the extension), and then download each of those desired files.

    • FYVE's avatar
      FYVE
      Explorer | Level 3

      Thanks! 

      I figured out the first issue. It was App Sandbox changing a random string of numbers in the local path every time the app launched. Whoops.

       

      Second issue was solved with an update thank you.

       

      Now stuck on upload/overwrite. Where it wants the file data here: 

      NSData *fileData = [@"file data example" dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];

       I'm giving it the local path to the file like the batch upload method but it just makes a file with text of the path I gave it. That can't be right! Ahah

      Also, thanks! I'll have to look into how to do that for multiple downloads. 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!