<fileManager_uri>/uploadtasks[.<format>]
Gets the list of all the uploading files, as well as create a file upload task resource uploadTask.
Supported Methods:
Supported output formats: rjson, json, xml.
Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.
http://supermapiserver:8090/iserver/manager/filemanager/uploadtasks.rjson
Gets the list of all the uploading files.
Returns the list of all the uploading files. The list is an array composed of taskInfo of each task. The status information of each task includes:
Field | Type | Description |
path | String | The target location of the uploading file in the current task, which is the name of the uploading file and the location. |
progress | double | The percentage of the uploading progress of the current file. |
Executes the GET request on the uploadTasks resource http://localhost:8090/iserver/manager/filemanager/uploadtasks.rjson,
then returns the uploading files as follows:
[{
"path": "d:\test\test.sxwu",
"progress": "88.51",
"taskID": "5280c5e718a34667b4d39c9d8ab45dc5_b77784d9aa1a4d578a57b03900fda75d"
}]
Creates a file uploading task resource, you can transfer an empty request body, or carry the following information in the request body, and the server will judge the disk space according to these information:
Field | Type | Description |
md5 | String | The md5 checksum string to be uploaded. |
fileSize | long | The size of the file to be uploaded, whose unit is byte. The server will determine whether the disk space is enough according to it. |
path | String | The path or location of the file to be uploaded, which can set to the file relative path. |
Returns the created file uploading task resources, including the following fields:
Field | Type | Description |
newResourceID | String | The ID of the results resource. |
newResourceLocation | String | The URI address of the results resource. |
postResultType | PostResultType | The result type of the POST request. The enumeration describes the influence of the POST request on the target resource, namely, what the handling result is like. |
succeed | String | Whether the request is successful. |
Executes the POST request on the uploadTasks resource http://localhost:8090/iserver/manager/filemanager/uploadtasks.rjson and then creates a file uploading task, then the request body transferred is as follows:
{
"md5": "4d028bf15ccc072fa2b769318e00f325" ,
"fileSize": "22970384",
"path": "../../samples/data/World/World.udb"
}
The response result in rjson format returned is as follows:
{
"newResourceID": "5280c5e718a34667b4d39c9d8ab45dc5_b77784d9aa1a4d578a57b03900fda75d",
"newResourceLocation": "http://localhost:8090/iserver/manager/filemanager/uploadtasks/5280c5e718a34667b4d39c9d8ab45dc5_b77784d9aa1a4d578a57b03900fda75d.rjson",
"postResultType": "CreateChild",
"succeed": true
}
In which, the generated child resource is http://localhost:8090/iserver/manager/filemanager/uploadtasks/5280c5e718a34667b4d39c9d8ab45dc5_b77784d9aa1a4d578a57b03900fda75d.rjson, i.e., the uploadTask resource, and "newResourceID" is the {taskID}.
Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.
HEAD request can be used to check if the uploadTasks resource exists, or if the uploadTasks resource can be accessed by clients. It can also determine if the uploadTasks resource supports an output format <format> if performed on a URI with .<format> included.