ng2-file-manager
ng2-file-manager copied to clipboard
Understand API Structure
Hi, I'm trying to use your code but unfortunately, I'm unable to list files. Looking at code debug I've seen there is this piece of code:
` var loc = window.location; var port = loc.port === '4200' ? 3010 : loc.port; var API_URL = loc.protocol + "//" + loc.hostname + ":" + port + "/api";
function ApiService(http) { this.http = http; this.url = API_URL; } ApiService.prototype.getFiles = function (path) { var params = new _angular_http.URLSearchParams(); params.set('path', path); return this.http.get(this.url + "/files", { search: params }) .map(this.extractData) .catch(this.handleError); }; ` This should do a call to a server api, asking about files... which is the expected structure? is it a json? Can you please attach an example, so I can build the appropriate result?
Thanks Maurizio
same question. Have you found out yet? @tutunci