Fileman
Manage Files
Restore a file from the trash
This function restores a previously trashed file or directory to its original location. Pass the item's original path. If the path was trashed more than once, the function restores the most recent copy. The function returns an error if the original path already exists.
Important:
When you disable the File Storage role, the system disables this function.
get/Fileman/restore_from_trash
Query parameters
pathstring path required
Example:public_html/unwanted.txt
The original path of the trashed file or directory.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "restore_from_trash",
"module": "Fileman",
"result": {
"data": {
"trash_leaf": "unwanted.txt"
},
"status": 1
}
}