473,748 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1919
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.FileS ystemObject 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
1302
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
4114
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
4318
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 that this is suppossed to end up as a component for others to use, and therefore I do NOT have access to their global.cs::Session_End() how do I cleanup files that were uploaded -- but obviously left stranded when the users aborted/gave up writting...
1
1066
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 *** Don't just participate in USENET...get rewarded for it!
5
655
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 and get rid of diretories with rmdir. This works well, but it seems that there should be a more efficient way. Here are my function definitions: def remove_files(target_dir): # This attempts to remove _all_ files from a directory. # Use with...
6
3348
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 subdirectories. However the program never seems to get out of the loop its in. I tried finding the error but I don't see where it goes wrong, hopefully someone can shed a light on this, source code is pasted below
3
1869
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 named "one", all directories that start with 02, move to a directory name "two", and so on.... I can't seem to find any easy way to do this. Looks like shutil.move only lets you move if the subdirectory DOES NOT exist, so after the first...
9
2415
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 Sub_directory files Sub_directory files Directory
3
1957
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 would like to do is recursively backup the specified directories (which copytree will do), but be able to specify exclusion directories (which copytree does not appear to allow you to do). My initial thoughts were I'll probably have to use...
0
8994
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9329
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8247
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4878
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.