471,601 Members | 1,235 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,601 software developers and data experts.

uploading directories recursively

Hi,

Is uploading recursively directories to a web server possible with
JavaScript?

I mean is it possible read a directory recursively and dynamically
construct <input type="file"> with value - the path to the
corresponding file and call submit with the script.

Thank you.

--
Kamen TOMOV
Feb 21 '06 #1
3 1763
Kamen TOMOV wrote:
Is uploading recursively directories to a web server possible
with JavaScript?
Not using javascript from a remote web sites under the standard security
restrictions (the browser does not normally expose the local files
system, or facilitate the loading of files from the local computer into
a variable).
I mean is it possible read a directory recursively and
dynamically construct <input type="file"> with value
- the path to the corresponding file and call submit
with the script.


In Windows IE, with security practically disabled, you can do exactly
that (You can instantiated a Scripting.FileSystemObject activeX object
and read the entire file system, including all the file names in all
directories). But with that level of security you can also re-format the
user's hard drives so you cannot expect these facilities over the public
Internet.

Richard.
Feb 21 '06 #2
On Tue, Feb 21 2006, Richard Cornford wrote:
Kamen TOMOV wrote:
Is uploading recursively directories to a web server possible
with JavaScript?


Not using javascript from a remote web sites under the standard security
restrictions (the browser does not normally expose the local files
system, or facilitate the loading of files from the local computer into
a variable).


Thanks. So does this mean that it is possible to be done if the
security of the browser is lowered? Can it be implemented for
different kind of browsers? Is it possible to lower the security only
for a particular remote web site?

Regards,
--
Kamen TOMOV
Feb 21 '06 #3
Kamen TOMOV wrote:
On Tue, Feb 21 2006, Richard Cornford wrote:
Kamen TOMOV wrote:
Is uploading recursively directories to a web server possible
with JavaScript? Not using javascript from a remote web sites under the standard security
restrictions (the browser does not normally expose the local files
system, or facilitate the loading of files from the local computer into
a variable).


Thanks. So does this mean that it is possible to be done if the
security of the browser is lowered?


Yes.
Can it be implemented for different kind of browsers?
Most certainly. XPCOM provides a host object for that, and you can use
the XUL IXMLHTTPRequest implementation, XMLHttpRequest, to submit the
files.

<http://xulplanet.com/references/xpcomref/>
<http://xulplanet.com/references/objref/>
Is it possible to lower the security only for a particular remote web
site?


It is. RTFM.
PointedEars
Feb 22 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Andrew M. | last post: by
1 post views Thread by rsine | last post: by
5 posts views Thread by rbt | last post: by
6 posts views Thread by Dreamcatcher | last post: by
3 posts views Thread by DataSmash | last post: by
3 posts views Thread by misceverything | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.