Attachment QML Type

A feature attachment. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Properties

Signals

Methods

Detailed Description

Note: You cannot declare or create a component of this type in QML code.

A feature attachment is an item associated with a feature but not an attribute of the feature. Where allowed, features may have zero or more attachments. Attachments can be images, documents, and so on. Information about an attachment includes name, size, and content type.

See also Cancelable.

Property Documentation

attachmentId : string

Returns the ID of the attachment (read-only).

Note: The underlying Runtime property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

This property was introduced in Esri.ArcGISRuntime 100.1.

See also attachmentIdAsInt.


attachmentIdAsInt : int

The same as attachmentId but represented as an integer type (read-only).

Note: The underlying Runtime property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

This property was introduced in Esri.ArcGISRuntime 100.3.


attachmentUrl : url

Returns the URL of the attachment (read-only).


contentType : string

Returns the MIME type of the attachment file (read-only).


dataFetched : bool

Returns whether the attachment's data has already been retrieved (read-only).

This is true if the attachment data has been retrieved previously. Even so, you must call fetchData() to get the data. The operation should complete more quickly since the data is already available locally.

You can request attachment data proactively to reduce the time it takes to retrieve the data from its source. However, to avoid unnecessary communication overhead, you should fetch the data only when the user needs it.


fetchDataStatus : Enums.TaskStatus

The status for the task to retrieve the collection of selected features.

See also Enums.TaskStatus.


name : string

Returns the name of the attachment (read-only).


size : string

Returns the size of the attachment in bytes (read-only).

Note: The underlying Runtime property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

See also sizeAsInt.


sizeAsInt : int

The same as size but represented as an integer type (read-only).

Note: The underlying Runtime property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

This property was introduced in Esri.ArcGISRuntime 100.3.


Signal Documentation

attachmentUrlChanged()

Emitted when the attachmentUrl property changes.

Note: The corresponding handler is onAttachmentUrlChanged.


dataFetchedChanged()

Emitted when the dataFetched property changes.

Note: The corresponding handler is onDataFetchedChanged.


fetchDataStatusChanged()

Emitted when the fetchDataStatus property changes.

Note: The corresponding handler is onFetchDataStatusChanged.


Method Documentation

bool cancelTask(string taskId)

Cancel the task with the ID taskId.

Returns false if the task cannot be canceled or there is no task with the specified id taskId.

See also Cancelable.


string fetchData()

Fetches the raw data for the attachment using an asynchronous task.

This method uses an asynchronous task that cannot be started if it is already running from a previous call to fetchData. You should check that the fetchDataStatus property is not Enums.TaskStatusInProgress before calling this method.

After the task starts, you may use the signal fetchDataStatusChanged to monitor task status.

Returns a task id that can be used to cancel the task.

See also Cancelable.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.