Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
In this guide of Dropbox it is nicely explained how to deal with files and folders in Dropbox using their API. But on reaching the endpoint to fetch files and folders in a location using Java SDK instead of list of FileMetaData objects we get MetaData objects which has much less fields for files/folders compare to FileMetaData. Is there a way to get FileMetaData objects instead of MetaData ones directly via API call, using the Java SDK?
DbxRequestConfig config = DbxRequestConfig.newBuilder("dropboxClient").build();
DbxClientV2 dbxClient = new DbxClientV2(config, "<access_token>");
ListFolderResult result = dbxClient.files().listFolderContinue("<last_cursor>");
List<MetaData> listMetaData = result.getEntries(); // Is there a way I can get list of FileMetaData objects instead of MetaData.
Check out the sample here for an example of how to check for and work with the different metadata types in the Java SDK.
Check out the sample here for an example of how to check for and work with the different metadata types in the Java SDK.
@user44 wrote:... Is there a way to get FileMetaData objects instead of MetaData ones directly via API call, using the Java SDK?
...
Hi @user44,
The Metadata class is just a basic class that multiple other classes derive from. This class is the common things between FilesMetadata, FolderMetadata, and DeletedMetadata. You never receive Metadata class instance in fact! All the time when you use that interface, it points to an instance of the classes already mentioned. Just a simple check will show you what it actually is. Take a look here for example.
Hope this helps.
Thanks!
Hi there!
If you need more help you can view your support options (expected response time for a 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!