Forum Discussion

tschutz's avatar
tschutz
New member | Level 2
4 years ago

Retrieve NamespaceId from FileId

Our Dropbox integration currently works as follows:

  1. User opens the DropboxPicker from our webpage
  2. User selects a number of files or folders
  3. Identifiers for the selected items are sent to our service (these are currently in the form of their IDs)
  4. Our service uses the Dropbox .NET SDK to resolve the IDs and perform some action on behalf of the user with the given files. This operation requires the Metadata for each selected item.

My current issues:

  1. The DropboxPicker does not give us any path related information for displaying the picked file. This means we can show no accurate representation of its location without integrating the Dropbox client into our frontend to retrieve that data (or round trip to our service once it has been resolved).  The picker clearly has the Metadata for the item - why can't we return that entire payload?
  2. If a user is part of a Team, there does not appear to be any way to take a file ID and figure out what namespace it belongs to. This means that the only way for me to use the ID to retrieve the Metadata for the file is to first try with the default namespace (user home) and then fallback to the Root namespace in the case of failure.  This is messy and inefficient so I'm hoping that this is just me misunderstanding how these unique item identifiers can be used to retrieve the associated metadata.

 

Thanks!

Tim

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

    Thanks for writing this up!

     

    1. The Dropbox Chooser doesn't offer a way to get the full metadata, such as the path, like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

     

    2. Unfortunately the Dropbox Chooser wasn't originally really built to work with the API like this, so it doesn't return namespace/root information that would be useful when handing off to an API integration. So, I'm afraid I don't have a good solution to offer here. I'll likewise pass this along as a request to offer a better option, but again I can't promise if/when that might be done.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 2 years ago
352 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!