- Required Capability:Query
- Version Introduced:10.0
The attachment resource represents an individual attachment associated with a feature. This resource is available only if the layer has advertised that it has attachments. A layer has attachments if its hasAttachments property is true.
The contents of the attachment are streamed to the client. Attachments are returned within an attachmentInfos resource. If the attachment is not found, an error is returned.
The response returned for this resource is a download of the attachment.
New at 10.9.1
Hosted feature service attachment resources support the w parameter, which returns attachments resized to a pixel width matching the w parameter's value. The supportsAttachmentsResizing layer property is set to true when the w parameter is supported.
An integer value that describes the width to resize an attachment image to when returned with the attachment resource. The resizing maintains the aspect ratio and is only applied to attachment images. Images cannot be made larger that the stored image by setting a larger w value. Sizes may also be snapped to the nearest preset size. By default, a value for w is not set, and the full resolution of the image is returned. This parameter is only supported when the supportsAttachmentsResizing layer property is set to true.
The following is a sample request URL for the attachment resource: