addItemResource
FunctionaddItemResource(requestOptions: IItemResourceOptions): Promise<IItemResourceResponse>
Add a resource associated with an item. See the REST Documentation for more information.
import { addItemResource } from "@esri/arcgis-rest-portal";
// Add a file resource
addItemResource({
id: '3ef',
resource: file,
name: 'bigkahuna.jpg',
authentication
})
.then(response)
// Add a text resource
addItemResource({
id: '4fg',
content: "Text content",
name: 'bigkahuna.txt',
authentication
})
.then(response)
Parameters
Parameter | Type | Notes |
---|---|---|
request | IItemResourceOptions | Options for the request |
Returns
Promise<IItemResourceResponse>
A Promise to add item resources.