Saturday, March 24, 2012

without server side scripting, can we upload a file using client side scripting if destina

without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible?

avdp211:

without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible?

I don't think it is possible.

You use the the HTML input file control and when you post the request, on the web server you need to read the data and save it to a file, so there has to be some interaction with the server to handle the post request.


Not possible via JavaScript, by design.

http://geekswithblogs.net/rashid/archive/2007/08/01/Create-An-Ajax-Style-File-Upload.aspx


thanks

ok then shall it be possible with http put method?


It's fairly certain that we'll never see a client side method for automating file uploads. The security concerns are just too great.

If you use a custom ActiveX control you can do it (think Windows Update), but it's impossible in JavaScript.

No comments:

Post a Comment