addAttachment

Function

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)

Attach a file to a feature by id. See Add Attachment for more information.

Parameters

Parameter Type Default Notes
requestOptions Required IAddAttachmentOptions

Options for the request.

Returns

Promise<IAddAttachmentResponse> - A Promise that will resolve with the addAttachment() response.


Function defined in packages/arcgis-rest-feature-service/src/addAttachment.ts:52