Create a File (chunked)
This operation allows you to create a new named file in the servers storage folder by uploading the file in several "chunks" which are appended together on the server to make a single file. This is useful when uploading very large files that would otherwise not be possible to process because of memory or network constraints.
A chunked upload takes place during a series of at least two web service calls.
1.A mandatory call to start the chunked upload.
2.Optionally, any number of calls to continue the upload.
3.A mandatory call to finish the chunked upload.
Starting a Chunked Upload
This operation starts a new chunked upload. The first part of the files data is passed and is written to a new file on the server. If the file already exists then the operation will fail.
HTTP method |
POST
|
URI |
/FileService/chunked/start/<filename>
|
Request headers |
Host: <server_dns_or_ip>[:<port>] Accept: <mime_type> Content-Length: <int> Content-Type: text/plain
|
Request body |
A string containing the first set of records from the text file.
|
Response headers |
Content-Length: <int> Date: <date_time> Server: Microsoft-HTTPAPI/2.0
|
Response body |
None
|
HTTP result codes |
HTTP 204 (no content) indicates that the first part of the file was created. HTTP 403 (forbidden) indicates that the file already existed and was NOT updated.
|
Continuing a Chunked Upload
This operation continues a chunked upload. The next part of the files data is passed and is appended to the existing file on the server.
HTTP method |
POST
|
URI |
/FileService/chunked/continue/<filename>
|
Request headers |
Host: <server_dns_or_ip>[:<port>] Accept: <mime_type> Content-Length: <int> Content-Type: text/plain
|
Request body |
A string containing the first set of records from the text file.
|
Response headers |
Content-Length: 0 Date: <date_time> Server: Microsoft-HTTPAPI/2.0
|
Response body |
None
|
HTTP result codes |
HTTP 204 (no content) indicates that the first part of the file was created. HTTP 400 (bad request) indicates that the file does not exist on the server.
|
Finishing a Chunked Upload
This operation finishes a chunked upload. The final part of the files data is passed and is appended to the existing file on the server.
HTTP method |
POST
|
URI |
/FileService/chunked/finish/<filename>
|
Request headers |
Host: <server_dns_or_ip>[:<port>] Accept: <mime_type> Content-Length: <int> Content-Type: text/plain
|
Request body |
A string containing the first set of records from the text file.
|
Response headers |
Content-Length: 0 Date: <date_time> Location: <url_to_retrieve_file> Server: Microsoft-HTTPAPI/2.0 ServerFileSpec: <file_spec>
|
Response body |
None
|
HTTP result codes |
HTTP 201 (created) indicates that the file was created. HTTP 403 (forbidden) indicates that the file already existed and was NOT updated.
|