Upload (Item Info)

URL:
https://<root>/services/<ServiceName>.<ServiceType>/iteminfo/upload
Methods:
POST
Required Capability:
Access allowed with either the "Update", "Delete", or "Security and infrastructure" privileges, or the Publisher role
Version Introduced:
10.9

Description

The upload 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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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

Use dark colors for code blocksCopy
1
{"status": "success"}

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