Upload

URL:
https://<root>/<serviceName>/<serviceType>/uploads/upload
Methods:
POST
Required Capability:
Uploads
Version Introduced:
10.0

Description

This operation uploads an item to the server. Each uploaded item is identified by a unique itemID. Since this request uploads a file, it must be a multi-part request as per IETF RFC1867.

See limiting Upload file size and file types to learn more about default file size and file type limitations imposed for uploads.

All uploaded items are subjected to the deletion rules set on the upload directory by the administrator of the server. Additionally, the administrator can explicitly delete an item as each uploaded item shows up in the list of all the uploaded items in Site Directory.

Users can provide arguments to the upload operation as query parameters. The parameter details are provided in the parameters table below.

Request parameters

ParameterDetails

f

The response format. The default response format is html.

Values: html | json

file

The file to be uploaded.

description

An optional description for the uploaded item.

Example usage: Upload a file

Use dark colors for code blocksCopy
1
https://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/uploads/upload

The input parameter file to this operation is a file.

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
{
    "success": <true|false>,
    "item": {
        "itemID": "<itemID>",
        "itemName": "<itemName>",
        "description": "<description>",
        "date": <date>,
        "committed": <true|false>
    }
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
{
    "success": true,
    "item": {
        "itemID": "ib740c7bb-e5d0-4156-9cea-12fa7d3a472c",
        "itemName": "lake.tif",
        "description": "Lake Tahoe",
        "date": 1246060800000,
        "committed": true
    }
}

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