Attachments
require(["esri/support/ContentElement/Attachments"], function(AttachmentsContentElement) { /* code goes here */ });esri/support/ContentElement/AttachmentsAn AttachmentsContentElement represents an attachment element associated with a feature. This resource is available only if the FeatureLayer's capabilities.data.supportsAttachment is true.
AttachmentsContentElement are a type of popup element. They are similar to TextContentElement and MediaContentElement elements, and they can only be set within the content.

- See also:
layer.popupTemplate.content = [{
  type: "attachments"
}];Constructors
- new Attachments(properties)
- Parameter:properties ObjectoptionalSee the properties for a list of all the properties that may be passed into the constructor. 
Property Overview
| Name | Type | Summary | Class | |
|---|---|---|---|---|
| AttachmentInfo | An array of AttachmentInfo objects used to display within the popup's content.more details | more details | Attachments | |
| String | The name of the class.more details | more details | Accessor | |
| String | A string value indicating how to display the attachment.more details | more details | Attachments | |
| String | The type of popup element displayed.more details | more details | Attachments | 
Property Details
- attachmentInfosautocast
- An array of AttachmentInfo objects used to display within the popup's content. 
- The name of the class. The declared class name is formatted as - esri.folder.className.
- displayTypeString
- A string value indicating how to display the attachment. Possible values are: preview | list - If - listis specified, attachments show as links.
- typeStringreadonly
- The type of popup element displayed. - Default Value:attachments
 
Method Overview
| Name | Return Type | Summary | Class | |
|---|---|---|---|---|
| Attachments | Creates a deep clone of the AttachmentsContentElement class.more details | more details | Attachments | |
| * | Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform.more details | more details | Attachments | |
| Object | Converts an instance of this class to its ArcGIS portal JSON representation.more details | more details | Attachments | 
Method Details
- clone(){Attachments}
- Creates a deep clone of the AttachmentsContentElement class. Returns:- Type - Description - Attachments - A deep clone of the AttachmentsContentElement instance. 
- fromJSON(json){*}static
- Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input - jsonparameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.Parameter:json Object- A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. Returns:- Type - Description - * - Returns a new instance of this class. 
- toJSON(){Object}
- Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() topic in the Guide for more information. Returns:- Type - Description - Object - The ArcGIS portal JSON representation of an instance of this class.