Description
This function uploads files.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
Fileman::upload_files
— This function uploads files.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Return |
Type |
Description |
Possible values |
Example |
dir |
string |
Required The directory. |
Any valid directory name. |
public_html |
file- |
string |
Required The files to upload. Important:
|
Any valid, incremented filename. |
file1-myfile.txt
|
Returns
Return |
Type |
Description |
Possible values |
Example |
reason |
string |
A reason for failure. This function only returns a reasonvalue if there was an error. |
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded. |
|
1 |