Summary:
Uploads a file to a server.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
|
Current working directory. The default value is:
|
|
|
Credentials with which the requested operation will be performed. |
|
|
|
|
Files to upload. One packet may contain multiple |
|
|
|
|
|
|
|
Target path and file name. |
|
|
|
The size of the data block being transferred in bytes. |
|
|
|
Offset in the target file in bytes. If not supplied, then the data will be inserted at the beginning of the file. If set to The |
|
|
|
The block of data to be transferred. |
|
|
|
|
|
|
|
|
|
|
|
Include this element if the destination file already exists and you want to overwrite it or add more data to it using the If the element is absent and the file already exists on the destination machine, the call will fail. |
|
|
|
|
Returns:
OK/Error
Example:
Input
Uploading the first block of data. The file doesn't exist on the target machine yet, so it will be created.
<packet version="4.0.0" id="545">
<target>filer</target>
<data>
<filer>
<upload>
<file>
<path>dGVzdDAxLnR4dA==</path>
<size>12</size>
<body>RGF0YSBibG9jayAx</body>
</file>
</upload>
</filer>
</data>
</packet>
Uploading the second data block. To append the data to the end of the file, the offset
and the force
options must be used.
<packet version="4.0.0" id="545">
<target>filer</target>
<data>
<filer>
<upload>
<file>
<path>dGVzdDAxLnR4dA==</path>
<size>17</size>
<body>U2Vjb25kIGRhdGEgYmxvY2s=</body>
<offset>12</offset>
</file>
<force/>
</upload>
</filer>
</data>
</packet>