Skip To Content
ArcGIS Developer
Dashboard

Upload (Item Info)

Description

This operation uploads a file associated with a service's item information to the server. The uploaded file is placed in a directory defined by the folder parameter, and is accessible by appending the path and file name to the Item Information URL. These uploads are filtered by an approved list of file name extensions:

  • .xml
  • .img
  • .png
  • .gif
  • .jpg
  • .jpeg
  • .bmp
  • .json

Request parameters

ParameterDetails
folder

The name of the folder on the server to which the file must be uploaded.

file

The file to be uploaded.

f

The response format. The default format is html.

Values: html | json | pjson

Example usage

The following is a sample POST request for the upload operation:


POST /context/admin/services/Hosted/MyService.FeatureServer/iteminfo/upload HTTP/1.1
Host: organization.domain.com
Content-Type: multipart/form-data; boundary=----boundary

------boundary
Content-Disposition: form-data; name="folder"

UserFolder
------boundary
Content-Disposition: form-data; name="file"; filename=""
Content-Type: application/octet-stream

image.jpg
------boundary
Content-Disposition: form-data; name="f"

pjson
------boundary
Content-Disposition: form-data; name="token"

pTF08-CHWCTee06taPxsNFRbqe6oAmq-WsyD-cOITvUXypJemoP8I_8rPZltViyfP46PmKhkicCgt8dMK5m-4H02kpkIGnUG5yxIgOfkoQRyZ9y3bMhVnkGnh24YU-KDKTI6QQI0kDASxSPWl_ntPevBHbqhORrxLgauHDHoRBCm48fEswZTOyZwQdozczzYbS3wKKecRT66v9ssoRmtmiYLREY4B_nkRfTEZoQSwr6w7LzqLAO5k3wwB3orC1LR
------boundary--

JSON Response example

{"status": "success"}