returnMetadata: true

374
1
05-15-2019 12:00 PM
PaulGiard
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
UndralBatsukh
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.  https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/AttachmentTest/FeatureServer/0/?f=...

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. 

Thanks,

-Undral

0 Kudos