Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
sbrownnw
3 years agoExplorer | Level 4
why is FolderId / SharedParentFolderId null or just missing for FileMetadata retrievals?
static void Main(string[] args)
{
DropboxClientConfig config = new DropboxClientConfig
{
MaxRetriesOnError = 0
};
DropboxClient dropbox...
- 3 years ago
A feature request has been filed to include the parent folder ID in the metadata response object.
I cannot promise when and if this will be implemented.
Greg-DB
Dropbox Community Moderator
3 years agoIn your original sample code here, you already have access to the parent folder's ID (not the same as the shared folder ID), in folderMetadata.Id.
In cases where you don't already have that parent folder metadata object though, you can retrieve the parent folder ID, given the metadata of a file (or folder), like this:
var parentFolderPath = Directory.GetParent(fileMetadata.PathLower).ToString();
var parentFolderId = dropboxClient.Files.GetMetadataAsync(parentFolderPath).Result.AsFolder.Id;
(Note that this is just a basic example, and assumes that the parent of fileMetadata is not root itself.)
sbrownnw
3 years agoExplorer | Level 4
yes, I know how to get it. if we are recursing down a deep folder hierarchy it with ListFolderAsync and building it up in memory, it would sure be nice for all the subfolders and subfolders of subfolders all to have the parent FolderId without having to make additional calls.
- DB-Des3 years ago
Dropbox Community Moderator
A feature request has been filed to include the parent folder ID in the metadata response object.
I cannot promise when and if this will be implemented.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!