- URL:
- https://<notebookserveradmin>/dataaccess/<workspacename>/notebookworkspace/uploadFile
- Methods:
POST- Required Capability:
- Administrator or Create and Edit
- Version Introduced:
- 10.9
Description
The upload operation allows uploads a single file to your workspace directory (/arcgis/home ). By default, the file is uploaded to the root of the workspace directory. You can prefix a directory path to the file name to upload the file to a subdirectory.
The upload file size limit is 128 MB for a single file. Large files can also be uploaded in parts from a client that has the ability to split files into smaller parts. To initiate a multipart upload, the client passes in the i parameter to the upload operation, along with the file and block . After uploading all parts, the operation can be completed by passing in the xml along with file and i .
Request parameters
| Parameter | Details |
|---|---|
(Required) | Defines the name of the file to be uploaded. Optionally, the file can be uploaded to a subdirectory by prefixing a folder path to the file name. If you upload a file using a Examples |
(Optional) | The file to be uploaded. This is required when uploading a single file or a file in multiple parts. This is not required when |
(Optional) | A Boolean that is set to Values: |
(Optional) | Required when uploading files in multiple parts. Examples |
(Optional) | Required to complete the upload of a large file in multiple parts. Once the individual parts have been uploaded, specify |
(Optional) | Required when uploading a single file or a file in multiple parts. This parameter is not required when Value: |
(Optional) | The response format. The default response format is Values: |
Example usage
The following are example requests for upload .
Example 1: Upload a single file to a folder
https://notebookserver.domain.com/context/admin/dataaccess/notebookworkspace/uploadFile
fileName = hydrology/mjwater.zip
uploadFile = <file>
x-ms-blob-type = BlockBlob
f = jsonExample 2: Upload a file in parts
The following example usage demonstrates using upload to upload a file in multiple parts.
Request 1: Upload part 1
https://notebookserver.domain.com/context/admin/dataaccess/notebookworkspace/uploadFile
fileName = mjwater.zip
uploadFile = <file>.part.001
isMultiPart = true
blockId = 0
x-ms-blob-type = BlockBlob
f = jsonRequest 2: Upload part 2
https://notebookserver.domain.com/context/admin/dataaccess/notebookworkspace/uploadFile
fileName = mjwater.zip
uploadFile = <file>.part.002
isMultiPart = true
blockId = 1
x-ms-blob-type = BlockBlob
f = jsonRequest 3: Complete upload
https://notebookserver.domain.com/context/admin/dataaccess/notebookworkspace/uploadFile
fileName = mjwater.zip
isMultiPart = true
uploadFile =
xmlField = <?xml version="1.0" encoding="utf-8"?> <BlockList> <Latest>1</Latest> <Latest>2</Latest></BlockList>
x-ms-blob-type = BlockBlob
f = jsonJSON Response syntax
{"status": "<success|failure>"}JSON Response example
{"status": "success"}