We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
kennyli_floqast
3 months agoExplorer | Level 3
How do i get the relative path for a folder?
My app is integrated with dropbox. However, I see some changes coming for business team dropbox: https://help.dropbox.com/plans/upcoming-business-team-changes?_camp=16203&_tk=banner_campaign_format#...
kennyli_floqast
Explorer | Level 3
Thanks! My code originally worked with team space but seems like they're rolling out changes. Not sure whats wrong with my existing code (I am already setting path-root). Does it have to be empty?
/**
* @param {Authorization} authorization
*/
function createDropboxInstance(authorization) {
const dropboxOptions = {
accessToken: authorization.access_token,
};
if (authorization.rootNamespaceId) {
Object.assign(dropboxOptions, {
pathRoot: JSON.stringify({
'.tag': 'root',
root: `${authorization.rootNamespaceId}`,
}),
});
}
return new DropboxSDK.Dropbox(dropboxOptions);
}
async fetchFilesAndFolders(storage, authorization) {
const dropboxSDKInstance = createDropboxInstance(authorization);
const folderMetadata = await this._folderInfoInternal(
storage,
authorization
);
return new Promise((resolve, reject) => {
const retryCallback = makeRetryCallback(resolve, reject);
retry(
Dropbox.retryOptions,
(callback) => {
dropboxSDKInstance
// @ts-ignore
.filesListFolder({ path: folderMetadata.path_display })
.then((response) => callback(null, response))
.catch((error) => {
this._logger.error(
formatLoggerErrors(
error,
'fetchFilesAndFolders'
)
);
this._logger.error(error);
callback(
StorageProviderError(
this.name,
error.status ? error.status : 500,
1005,
error.error
)
);
});
},
retryCallback,
this._logger
);
});
}
Greg-DB
3 months agoDropbox Staff
There are a number of ways to use the functionality, depending on what you're trying to do, but the pathRoot field, if being used, should not be empty. In order to access the team space, for instance, you should use the root mode and use the root namespace ID for the connected account.
To clarify, is something in particular currently not working as expected? Please feel free to share the specific error/unexpected output and I'll be happy to take a look.
Note that if you need a test team, you can request one using the process described under the "How do I test my application?" question here. Be sure to indicate what specifically you need to test.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,878 PostsLatest Activity: 21 minutes agoIf 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!