Hi all,
I'm coding a plugin for Wing FTP Server (webclient). This plugin is made to manage users and contacts.
I can't manage to use API's functions from my plugin. Is there any technics or tutorial to help me using the API? I don't understand how to use it properly.
I would like for exemple get all users from a domain.
I'm using Wing FTP Server 4.2.0 entreprise licence.
Lua functions in plugins
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Lua functions in plugins
The Lua API in the help manual is for the web admin, not web client, and there is no API to get all users from a domain in the web client.
-
- Posts: 2
- Joined: Fri Jul 12, 2013 9:22 am
Re: Lua functions in plugins
Thank you for your help.
I understand my mistake and I found a new direction @ topic.
So I try to use the page "admin_webservice.html" but I don't understand why it doesn't work.
I use xmlhttp Javascript object : (in parameter command which is the lua script that I whant)
The execution works well and the web browser recive a "200 HTTP OK" response. But the response from my command is empty, and the webpage is blank.
Do you know anything about my issue here?
Thanks!!
I understand my mistake and I found a new direction @ topic.
So I try to use the page "admin_webservice.html" but I don't understand why it doesn't work.
I use xmlhttp Javascript object : (in parameter command which is the lua script that I whant)
Code: Select all
function sabx_ajaxRequest(command)
{
xmlhttp.open('get','https://xxxxx.xxx.xx:5466/admin_webservice.html?admin=xxx&pass=xxx&cmd='+command);
xmlhttp.onreadystatechange = sabx_ajaxResponse;
xmlhttp.send();
}
function sabx_ajaxResponse()
{
if(xmlhttp.readyState == 4)
{
var response = xmlhttp.responseText;
response = response.replace(/(\[nil value\])$/, "");
alert(txt2html(response));
}
}
Do you know anything about my issue here?
Thanks!!
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Lua functions in plugins
what's the command string?
BTW, using Lua webservice in the web client is very dangerous, clients can get your admin USER/PASS, and then they can execute any Lua scripts.
BTW, using Lua webservice in the web client is very dangerous, clients can get your admin USER/PASS, and then they can execute any Lua scripts.