Announcements
Known issues updated. Learn more
Highlighted

File/Folder paths arent set

Level 2

Hello,

when I try to call /files/get_metadata of any file or folder, the returned entry doesn't contain path_lower or path_display. I am assuming that means those values aren't set, but I'm not sure how that can even happen.

This is an issue because it means I can only access files via the File ID, but when you look up files/list_folder/continue for changes, the entry of a deleted file doesn't contain the file ID but it should normally contain the path. However since the path isn't set, all I am left with is the deleted tag and the file name, which isn't enough to do anything

1 Accepted solution

Accepted Solutions

Re: File/Folder paths arent set

Dropboxer

If the path values aren't set, that means that "the file or folder is not mounted". There are a few ways that can happen:

  • if you're looking at the contents of a shared folder that is itself not mounted
  • if you're making an API call without an explicit "root", so the contents don't have anywhere to be "mounted" to

For example, the second one can occur if you're using a Dropbox Business API app with the "team member file acces" permission, and are supplying the "Dropbox-API-Select-Admin" header but aren't supplying the "Dropbox-API-Path-Root" header. With that admin header, you're accessing any team content, but without the root header, it isn't relative to anything. If that's the case, you should supply the root header. You can find information on how that works in the Namespace Guide.

The Content Access Guide may also be helpful reference.

Otherwise, if you share the code, I'll be happy to take a look and advise specifically.

Reply
Loading...
2 Replies

Re: File/Folder paths arent set

Dropboxer

If the path values aren't set, that means that "the file or folder is not mounted". There are a few ways that can happen:

  • if you're looking at the contents of a shared folder that is itself not mounted
  • if you're making an API call without an explicit "root", so the contents don't have anywhere to be "mounted" to

For example, the second one can occur if you're using a Dropbox Business API app with the "team member file acces" permission, and are supplying the "Dropbox-API-Select-Admin" header but aren't supplying the "Dropbox-API-Path-Root" header. With that admin header, you're accessing any team content, but without the root header, it isn't relative to anything. If that's the case, you should supply the root header. You can find information on how that works in the Namespace Guide.

The Content Access Guide may also be helpful reference.

Otherwise, if you share the code, I'll be happy to take a look and advise specifically.

Reply
Loading...

Re: File/Folder paths arent set

Level 2

Supplying the Dropbox-API-Path-Root header worked, thanks a lot!

Reply
Loading...
API Support

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about API Support.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post