I have a B4J program that runs on a PC, where Filezilla Server is currently running
I would need to create a list of users/passwords/homes in Filezilla Server so that it is accessible by multiple users with different home directories
It is also necessary to delete a specific Filezilla Server user, always using B4J code
Do you know if Filezilla Server can be controlled, via script, com interface, or other system?
Filezilla Server 1.9.4
Tryng to convert the c# code:
B4X:
Sub CreateFileZillaUser()
Dim Job As HttpJob
Job.Initialize("FileZilla", Me)
Dim adminUser As String = "admin" ' Sostituisci con il tuo username admin
Dim adminPassword As String = "password" ' Sostituisci con la tua password
Dim url As String = "http://localhost:14148"
' JSON per creare un nuovo utente
Dim json As String = $"{
"command": "User.AddUser",
"arguments": {
"name": "NewUser"
}
}"$
' Invia richiesta HTTP
Job.Username = adminUser
Job.Password = adminPassword
Job.PostString(url, json)
Job.GetRequest.SetContentType("application/json")
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success Then
Log("Risposta: " & Job.GetString)
Else
Log("Errore: " & Job.ErrorMessage)
End If
Job.Release
End Sub