cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Learn all about apps and Dropbox integrations to make working from home easy here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Property Groups always null Java SDK

Property Groups always null Java SDK

dsecfx
New member | Level 2

I have created a template and a list of property group objects but when I get the meta data for the file in a search after I've uploaded it says null for property group.  The property groups should have been included when the file is uploaded.  I use the Java SDK and I have tried a few different ways:

FileMetadata metadata = client.withPathRoot(pathRoot)
.files()
.uploadBuilder(finalFilePath)
.withPropertyGroups(propertyGroups)
.uploadAndFinish(in);

And also

FileMetadata metadata = client.withPathRoot(pathRoot)
.files()
.uploadBuilder(finalFilePath)
.uploadAndFinish(in);
client.fileProperties().propertiesAdd(metadata.getId(), propertyGroups);

I try getting the metadata a couple of different ways but it is always null:

client.withPathRoot(pathRoot).files().getMetadata(filePath)

Nothing seems to work.  Any help will be greatly appreciated.

1 Reply 1

Re: Property Groups always null Java SDK

Greg-DB
Dropboxer

Apologies for the confusion. When uploading files, you won't see the property information returned in the metadata directly. (I'll pass this along as a feature request though.)

To retrieve it, you'll need to call getMetadataBuilder to get a GetMetadataBuilder, and then use GetMetadataBuilder.withIncludePropertyGroups to specifically request the property information.

Poll
How do you get refocussed while working from home? Do you find any of these options keep you from getting distracted?
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?