- 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
Parameter | Details |
---|---|
| The name of the folder on the server to which the file must be uploaded. |
| The file to be uploaded. |
| The response format. The default format is Values: |
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"}