addAttachment
FunctionaddAttachment(requestOptions: IAddAttachmentOptions): Promise<{ addAttachmentResult: IEditFeatureResult }>
Attach a file to a feature by id. See Add Attachment for more information.
import { addAttachment } from '@esri/arcgis-rest-feature-service';
//
addAttachment({
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
featureId: 8484,
attachment: myFileInput.files[0]
})
.then(response)
Parameters
Parameter | Type | Notes |
---|---|---|
request | IAddAttachmentOptions | Options for the request. |
Returns
Promise<{ addAttachmentResult: IEditFeatureResult }>
A Promise that will resolve with the addAttachment()
response.