2
I need to list files from a folder that sits in one ftp server, how do I access this folder ?
The user must select a list item (<select><option></option></select>)
called listDirectories and in the change event makes the call via ajax to server via FTP to list the name of the Archives, it would be something like this:
That way it works ?
$('#**listarDiretorios**').on('change', function () {
$.ajax({
url: 'ftp://urldoservidor.meusite.com.br/DiretorioDeArquivos',
type: "GET",
success: function (data) {
$("#listaDeArquios").empty();
$("#listaDeArquios").append('<option value>Selecione...</option>');
$.each(data, function (index, element) {
$("#listaDeArquios").append('<option value="' + element.NomeArquivo + '">' + element.NomeArquivo + '</option>');
}
});
}
});
Note: I have the User and Password access to this folder.