returnMetadata: true

05-15-2019 12:00 PM
New Contributor III

I am having a problem with feature layer queryAttachments.  When I query for Exif data with returnMetadata = true;

Exif null is returned. 

I am using Typescript with ArcGIS-JS-API 4.11

Is there something else I need to do to Portal to make this work?

const attachmentQuery = {
objectIds: feature.getAttribute('OBJECTID'),
returnMetadata: true

return featureLayer.queryAttachments(attachmentQuery);
Tags (1)
0 Kudos
1 Reply
Esri Regular Contributor

Hi there, 

The exifInfo is only supported with hosted featureservices at this point and also the service needs have attachmentProperties.exifInfo enabled. For example take a look at the following service.

Once on the page, search for attachmentProperties. You will see that exifInfo is not enabled on this service. So attachment query will never return exifInfo associated with attachments. You need to enable exifInfo through your organization admin page for the service. Newly created hosted services will have this property enabled by default. With this said, we will add attachment properties to FeatureLayer.capabilities so that you can check if attachment properties are enabled before you issue a request for attachments. 

Hopefully this is the case for you. If not, please give me more details so I can reproduce the issue. 



0 Kudos