简体   繁体   中英

Is there any way to download and upload file without any server side language

User will click on button to download file, once it started then it will abort or cancel after some time interval. Also I want to upload a file without user intervention. I would like to know whether it is possible with client side scripting (jQuery, Ajax, jQuery-form.js...). Can some one suggest whether it is possible using either of these techniques (ie without any server side scripting).

Regds

The short answer is: not likely. The long answer:

You might be able to upload a file using a PUT http request. However, most servers are not set up to handle PUT requests without some sort of server-side scripting. (See this article for how Apache can be set up to handle PUT requests.) Also, many servers are set up to not handle PUT requests at all due to security concerns.

Another possibility is to store files on the server using ftp. (See the Mozilla docs on using XMLHttpRequest .) Unfortunately, most browsers will not support an Ajax request where the protocol is changed to ftp: . (Note that the XMLHttpRequest spec states that protocols other than HTTP/HTTPS might be supported but are not covered by the spec.) As with PUT, configuring the server to handle ftp requests also raises security concerns.

No there is not, as there are some basic questions that the browser scripting cannot answer, the most important being:

  • Where do I save the file to?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM