JS FTP web directory filelist

2024/2/27 8:10:38

Is it possible to use Javascript to invoke a FTP call to a specified URL and retrieve all files in this webdirectory?

...

Answer

Assuming you are talking about javascript in the browser, then this is not possible without some supporting server side code.

You can use javascript to make an ajax call to a server - the server can invoke FTP and retrieve a file list (or even the files) to the server. These can then be downloaded from the server.

http://en.ppmy.cn/q/42401.html

Related Q&A

dynamically loaded js function does not appear in Firebug js debugger

There is a page1.html (I open it in browser):<div id="content"> </div> <script type="text/JavaScript">jQuery.ajax({type : "GET",url : page2.html,dataType…

How to position a fixed-location element on IOS browser when zoomed?

I have a nice little React drag-drop library that works for mouse- and touch systems. For touch, it grabs the touch location via clientX and clientY (e.targetTouches[0].clientX, e.targetTouches[0].clie…

JQuery Mobile file upload [closed]

Its difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying thi…

Google Maps Android Studio - how disable the map controls?

Im working in Android Studio with MapsActivity. Everything works fine, but how do I disable the map controls that show up on top of the Google map?Here is my code:public class MapsActivity extends Fra…

Is it possible to hide URL bar in iOS 9 (Safari browser) by using JavaScript?

I want to hide the URL bar from my single-page application by using JavaScript.I tried to set bigger height of the body element and then perform:window.scrollTo(0, 0);But it doesnt work. The URL bar is…

Evaluate in PhantomJS doesnt seem to work

I have a problem with JavaScript magic. When I execute this code:var page = require(webpage).create(); var url="http://google.com"; page.open(url, function (status){if (status!== "succes…

WebSocket handshake: Unexpected response code: 404 -

I am learning about websockets and followed the instructions here: http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/HomeWebsocket/WebsocketHome.htmlI using tomcat v8.0.21 to deploy my web…

Listen to Custom DOM Events in Angular

I use an Angular library, which has a component, which uses CustomEvents to dispatch something, like this:const domEvent = new CustomEvent(unselect, {bubbles: true });this.elementRef.nativeElement.disp…

How to get authorization to UCWA and Skype Web SDK?

I have a Skype for Business account call [email protected] and Im trying to get authorization. My first request to lyncdiscover serviceGET https://lyncdiscover.shockw4ves.onmicrosoft.com/Answer:{"…

Getting cursor position in a canvas without jQuery

I am trying to learn how to use the HTML canvas element, and naturally, I am making a drawing application. So, I have the code set up for the actual drawing and animating part of the app, but I am not …