473,385 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 1889
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andrew M. | last post by:
Is it possible to upload entire directories from a form in such a way that a user can browse to the folder on their local machine and select it for uploading or synchronization? I am using php5.
1
by: Trinity | last post by:
Hi, I want to delete a particular file in all the sub-directories. I am using the SHFileOperation() API. But it is not deleting the files recursively. Any sample code is appreciated. TIA
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
1
by: rsine | last post by:
I need to know all the directories that exist within a given location. Is there a way to get such a listing? Any help is appreciated. *** Sent via Developersdex http://www.developersdex.com...
5
by: rbt | last post by:
What is the most efficient way to recursively remove files and directories? Currently, I'm using os.walk() to unlink any files present, then I call os.walk() again with the topdown=False option...
6
by: Dreamcatcher | last post by:
Hello, I'm trying to learn some C, reading my book, Beginning Linux Programming I came across the following program. The program is supposed to walk through directory's and print all its...
3
by: DataSmash | last post by:
Hi, I need to organize thousands of directories full of files. I want to move these directories into other subdirectories. For example, all the directories that start with 01, move to a directory...
9
by: bhumikas | last post by:
Hi all, I need a help in perl script.The basic idea is,it must have command line arguments for the user flexibility.the files are in the format as shown below. MainFolder Directory ...
3
by: misceverything | last post by:
I am writing a script that will backup specified folders from one hard drive to another (for example, backup source "C:\DATA", destination "D: \Backup"), and was thinking of using shutil. What I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.