cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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: 

404 error reading metadata

404 error reading metadata

Bill T.16
New member | Level 1

I have been experimenting with the DBRoulette example. It is working fine when I create the app specifying access to the user's whole dropbox account. However, for privacy reasons I will want to restrict access to just a specific folder. When I set it up that way and create the "Photos" directory in the Apps directory, I get a 404 error when trying to read its metadata.

[WARNING] DropboxSDK: error making request to /1/metadata/sandbox/Photos - (404) Path '/Photos' not found
2015-07-01 07:51:26.710 DBRoulette[2535:209409] restClient:loadMetadataFailedWithError: The operation couldn’t be completed. (dropbox.com error 404.)

The "Photos" directory is certainly in the Apps folder. Isn't that where is should be?

Maybe I misunderstand the use case. I'd like the user to be able to drop files in this special folder and I can access them. However, the wording when you create the App says "My app only needs access to files it creates." Does this mean that the user can't create files and have them recognized? Do I have to use full access in order to accomplish that?

4 Replies 4

Re: 404 error reading metadata

Greg-DB
Dropboxer

By default, the Photos folder exists at /Photos, so that DBRoulette example will only work for non-app folder permission apps, since app folders exist at /Apps/{app folder name}. You can create a Photos folder inside /Apps/{app folder name} manually though, e.g., via the web site.

Anyway, sample app aside, the "My app only needs access to files it creates." selection results in your app having the app folder permission. When a user links an app with the app folder permission to their account, a special app folder is created in the account, under /Apps/. The user can add any files or folders in that app folder and the app will be able to see them.

Re: 404 error reading metadata

Bill T.16
New member | Level 1

Greg,

Thanks for the response. I did just figure out my problem. The uncertainty was what the photosRoot should be in the case of a folder permissions app.

[self.restClient loadMetadata:photosRoot withHash:photosHash];

I had assumed it would be either "/Photos" or "/Apps/Photos" or maybe "Photos". Instead, it appears you specify "/" in this case and the rest is assumed. With "/" as the root it appears to be accessing the directory correctly.

Possibly I missed this in the documentation but if not, you might consider clarifying it in the docs.

Re: 404 error reading metadata

cgtpuneet a.
New member | Level 1

Hello 

I am using dropbox in my ios app i can access images and pdf files from route folder but i am not able to access the files from subfolders it give 404 error . So let me know how i can access subfolder contains its not downloading in iPhone.

If anyone guide me.

 

Thanks

Puneet

 

Re: 404 error reading metadata

Greg-DB
Dropboxer

You should certainly be able to access files in subfolders using the API, by specifying the path of the subfolder, e.g., /foldername/subfoldername.

This thread was about a specific scenario with the sample app, so if you're still having trouble, please open a new thread with more details:

https://www.dropboxforum.com/hc/en-us/community/posts/new?community_post%5Btopic_id%5D=200209245

Please include the relevant code snippets, as well as the full output/error.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    cgtpuneet a. New member | Level 1
  • User avatar
    Bill T.16 New member | Level 1
What do Dropbox user levels mean?
Need more support?