json output for CMD_FILE_MANAGER

Version 1.51.0


For any CMD_FILE_MANAGER request, if you include: json=yes with your GET or POST variables, any "dynamic" page output will be in json format, rather than html. Will be either a success: { "result": "/test/apache", "success": "File ownership reset" } or error: { "error": "An Error Occurred", "result": "No files have been selected for upload." } for any CMD_FILE_MANAGER command that generates the dynamic output (aka: the template.html skin file). Errors generate: 500 Internal Server Error This is handy for ajax type calls to rename/copy files/folders, manage the clipboard, etc.. without needing to reload the whole page. For the list of commands, see the CMD_API_FILE_MANAGER pages, as they're pretty much the same. The main reason for making this json version was because the API might be disabled for a User, but the new skin requires ajax type requests of CMD_FILE_MANAGER for in-page file/folder management.

Try DirectAdmin with a 30-day money back guarantee!