Description
This function uploads files.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameters |
Type |
Description |
Possible values |
Example |
dir |
string |
Required The directory to which to upload the files. |
A valid directory on the server, relative to the user's home directory. |
public_html |
file-* |
string |
Required The files to upload. Important:
|
A valid filename on the server. |
nail.html |
Returns
Return |
Type |
Description |
Possible values |
Example |
uploads |
array |
A list of files that uploaded to the specified directory. |
A list of upload files. |
example.html |
succeeded |
integer |
The number of files that uploaded successfully. |
A positive integer. |
1 |
warned |
integer |
The number of files that did not fully upload. |
A positive integer. |
0 |
failed |
integer |
The number of files that failed to upload. |
A positive integer. |
0 |