updateAttachment

updateAttachment

Function
updateAttachment(requestOptionsIUpdateAttachmentOptions): Promise<{ updateAttachmentResult: IEditFeatureResult }>

Update a related attachment to a feature by id. See Update Attachment for more information.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
import { updateAttachment } from '@esri/arcgis-rest-feature-service';
//
updateAttachment({
  url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
  featureId: 8484,
  attachment: myFileInput.files[0],
  attachmentId: 306
});
Parameters
ParameterTypeNotes
requestOptions
IUpdateAttachmentOptions

Options for the request.

Returns 
Promise<{ updateAttachmentResult: IEditFeatureResult }>

A Promise that will resolve with the updateAttachment() response.

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