473,395 Members | 1,742 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,395 software developers and data experts.

Multiple upload

On a user workstation there is a file linked to many other files. The user
upload this file to my server. I can build a list of these files. But I
don't know the path to these files on the workstation. PHP does not give
this information. I am looking for a simple solution from the user point of
view for him to send me all these files.

Because I don't know the path to the file, I can ask the user to type the
path in a dialog box.

I don't have, from the server, a possibility to upload the files on the
workstation. And I don't know how the pre-fill the <input type="file" />
field of a form.

Am I wrong ?

Is there a simple solution that I missed ?

Jul 17 '05 #1
8 3098
*** François Granger wrote/escribió (Mon, 19 Apr 2004 15:26:41 +0200):
I don't know how the pre-fill the <input type="file" />
field of a form.


You can't. It's an elementary security measure. Otherwise, any web site
could get a copy of any file in your computer.

--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #2
Le 19/04/04 16:37, dans 1e*****************************@40tude.net, «*Alvaro
G Vicario*» <al******************@telecomputeronline.com> a écrit*:
*** François Granger wrote/escribió (Mon, 19 Apr 2004 15:26:41 +0200):
I don't know how the pre-fill the <input type="file" />
field of a form.


You can't. It's an elementary security measure. Otherwise, any web site
could get a copy of any file in your computer.


I was pretty sure that it was not possible, but I needed a confirmation.

And it is not possible to upload a full directory in one click ?

Muchas gracias.

Jul 17 '05 #3
*** François Granger wrote/escribió (Mon, 19 Apr 2004 18:24:45 +0200):
And it is not possible to upload a full directory in one click ?


Nope, all we have is that ugly file input box. Have you considered using a
Java applet? Java can do things like that and maybe someone already wrote
an applet to upload directories.
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #4
Alvaro G Vicario wrote:
*** François Granger wrote/escribió (Mon, 19 Apr 2004 15:26:41 +0200):
I don't know how the pre-fill the <input type="file" />
field of a form.
You can't.


Well, you *can*: "User agents may use the value of the value attribute
as the initial file name" (HTML4.01, sec. 17.4.1). Whether what
happens next works is another matter, and indeed YMMV.
It's an elementary security measure.
Yes, that's pretty much the browser developers' excuse for not
implementing it. But, no, there's nothing inherently insecure about
suggesting default file names. Some browsers implement it, some
don't. It comes as no surprise that Internet Explorer doesn't.
Otherwise, any web site could get a copy of any file in your computer.


RFC1867, sec. 8, says:

| It is important that a user agent not send any file that the user
| has not explicitly asked to be sent. Thus, HTML interpreting agents
| are expected to confirm any default file names that might be
| suggested with <INPUT TYPE=file VALUE="yyyy">.

RFC1867, "Form-based File Upload in HTML",
http://www.ietf.org/rfc/rfc1867.txt

--
Jock
Jul 17 '05 #5
*** John Dunlop wrote/escribió (Mon, 19 Apr 2004 20:15:45 +0100):
Thus, HTML interpreting agents are expected to confirm any
default file names that might be suggested with <INPUT TYPE=file VALUE="yyyy">.


Well, that sound's okay. I guess that feature would be useful for
intranets.

--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #6
Le 20/04/04 9:24, dans l0*****************************@40tude.net, «*Alvaro
G Vicario*» <al******************@telecomputeronline.com> a écrit*:
*** John Dunlop wrote/escribió (Mon, 19 Apr 2004 20:15:45 +0100):
Thus, HTML interpreting agents are expected to confirm any
default file names that might be suggested with <INPUT TYPE=file
VALUE="yyyy">.


Well, that sound's okay. I guess that feature would be useful for
intranets.


Thanks a lot for your help. I tested this and none of my browser keep the
content of value="".

All this look logical.

Jul 17 '05 #7
On Mon, 19 Apr 2004 18:24:45 +0200, François Granger
<fg******@alussinan.org> wrote:
Le 19/04/04 16:37, dans 1e*****************************@40tude.net, «*Alvaro
G Vicario*» <al******************@telecomputeronline.com> a écrit*:
*** François Granger wrote/escribió (Mon, 19 Apr 2004 15:26:41 +0200):
I don't know how the pre-fill the <input type="file" />
field of a form.


You can't. It's an elementary security measure. Otherwise, any web site
could get a copy of any file in your computer.


I was pretty sure that it was not possible, but I needed a confirmation.

And it is not possible to upload a full directory in one click ?


An <input type='file'> should allow selection of multiple files,
although IIRC Opera is the only browser that supports it.

Could you have your user zip their files and unzip them server-side?

--
David ( @priz.co.uk )
Jul 17 '05 #8
Le 20/04/04 13:12, dans 8o********************************@4ax.com, «*David
Mackenzie*» <me@privacy.net> a écrit*:
An <input type='file'> should allow selection of multiple files,
although IIRC Opera is the only browser that supports it.
In php there is a multiple upload a option, but one has to select each
file... :-(
Could you have your user zip their files and unzip them server-side?


I am targeting really low level multiplatform users ;-)

But with no other solution, I may end up implementing this.

Thanks to all.

Jul 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: 3A Web Hosting | last post by:
Hi Is it possible to perform multiple file uploads via a form? It's no problem uploading single files but I want to be able to highlight a group of files and upload them all in one go. My...
6
by: x. zhang | last post by:
Hi Guys, We know that we can use <input type=file ...> to upload one file per time to the server. My question is if there are some way to upload multiple files per time to the server. (Of...
5
by: Jason | last post by:
I have a potential need to upload multiple PDF legal documents. Is it possible to attach more than one file per upload?
4
by: Vanessa | last post by:
I have an ASP script which is used to upload files with Persits.Upload.1 object. But I can't get the values from mutliple checkboxes in the form like normally. <form method="post"...
7
by: crowl | last post by:
Hi there, I am looking for a component allowing me uploading multiple files by my asp page. I have found several components achieving this by require a <input type="file" name="FileX"> field for...
3
by: imrantbd | last post by:
I need array type name like "destList" must use for my destlist select box,not a single name.Or need a solution to capture multiple value of "destList" select box and send all selected value in php...
1
Fary4u
by: Fary4u | last post by:
Hi Guys i'm trying to upload a file, i've tried 3 different methods but still not work out i don't know how to over come this problem hidden file value, multiple form or popup uploading. 1-...
9
by: torso | last post by:
Hi Does someone know a good tutorial for multiple file upload with xmlHttpRequest. I am trying to do directory upload. So I could choose directorys and upload those to the server. Another...
43
by: bonneylake | last post by:
Hey Everyone, Well this is my first time asking a question on here so please forgive me if i post my question in the wrong section. What i am trying to do is upload multiple files like gmail...
4
by: MoroccoIT | last post by:
Greetings - I saw somewhat similar code (pls see link below) that does mupltiple files upload. It works fine, but I wanted to populate the database with the same files that are uploaded to...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.