Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > multiple file upload+xmlHttpRequest

Reply
Thread Tools

multiple file upload+xmlHttpRequest

 
 
torso
Guest
Posts: n/a
 
      08-10-2008
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 solution would be fake multiple file upload. It's takes only
address of directorys and after choosing few address, you could push
send button and PHP would do the rest.

Can someone help me to find solutions for this problem. Is it easy to
make javascript(using xmlHttpRequest I think) to get addresses.
 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      08-10-2008
torso wrote:
> 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.


You could not, security precautions prevent this.

> Another solution would be fake multiple file upload. It's takes only
> address of directorys and after choosing few address, you could push
> send button and PHP would do the rest.


Security precautions prevent this as well.

> Can someone help me to find solutions for this problem.


<http://groups.google.com/groups/search?q=group%3Acomp.lang.javascript+xmlhttpreque st+multiple+files+upload&scoring=d&filter=0>
<http://www.jibbering.com/faq/#FAQ2_3>

> Is it easy to make javascript(using xmlHttpRequest I think) to get
> addresses.


If that is a question: no.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$(E-Mail Removed)>
 
Reply With Quote
 
 
 
 
torso
Guest
Posts: n/a
 
      08-10-2008
So I get all wrong. Okey.
How I should do it.
http://www.fyneworks.com/jquery/multiple-file-upload/ there is some
kind of solution.
How that plugin is done.


On 10 elo, 23:02, Thomas 'PointedEars' Lahn <(E-Mail Removed)>
wrote:
> torso wrote:
> > 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.

>
> You could not, security precautions prevent this.
>
> > Another solution would be fake multiple file upload. It's takes only
> > address of directorys and after choosing few address, you could push
> > send button and PHP would do the rest.

>
> Security precautions prevent this as well.
>
> > Can someone help me to find solutions for this problem.

>
> <http://groups.google.com/groups/search?q=group%3Acomp.lang.javascript....>
> <http://www.jibbering.com/faq/#FAQ2_3>
>
> > Is it easy to make javascript(using xmlHttpRequest I think) to get
> > addresses.

>
> If that is a question: no.
>
> PointedEars
> --
> Prototype.js was written by people who don't know javascript for people
> who don't know javascript. People who don't know javascript are not
> the best source of advice on designing systems that use javascript.
> * -- Richard Cornford, cljs, <f806at$ail$1$(E-Mail Removed)>


 
Reply With Quote
 
Matt
Guest
Posts: n/a
 
      08-11-2008
Gmail uses an iframe to do an "asynchronous" ajax-like file upload.

On Aug 10, 3:57*pm, torso <(E-Mail Removed)> wrote:
> So I get all wrong. Okey.
> How I should do it.http://www.fyneworks.com/jquery/mult...e-upload/there is some
> kind of solution.
> How that plugin is done.
>
> On 10 elo, 23:02, Thomas 'PointedEars' Lahn <(E-Mail Removed)>
> wrote:
>
> > torso wrote:
> > > 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.

>
> > You could not, security precautions prevent this.

>
> > > Another solution would be fake multiple file upload. It's takes only
> > > address of directorys and after choosing few address, you could push
> > > send button and PHP would do the rest.

>
> > Security precautions prevent this as well.

>
> > > Can someone help me to find solutions for this problem.

>
> > <http://groups.google.com/groups/search?q=group%3Acomp.lang.javascript...>
> > <http://www.jibbering.com/faq/#FAQ2_3>

>
> > > Is it easy to make javascript(using xmlHttpRequest I think) to get
> > > addresses.

>
> > If that is a question: no.

>
> > PointedEars
> > --
> > Prototype.js was written by people who don't know javascript for people
> > who don't know javascript. People who don't know javascript are not
> > the best source of advice on designing systems that use javascript.
> > * -- Richard Cornford, cljs, <f806at$ail$1$(E-Mail Removed)>

>
>


 
Reply With Quote
 
Gregor Kofler
Guest
Posts: n/a
 
      08-11-2008
torso meinte:
> So I get all wrong. Okey.
> How I should do it.


You can't. Period. All those multi-file uploaders nowadays use flash.

> http://www.fyneworks.com/jquery/multiple-file-upload/ there is some
> kind of solution.
> How that plugin is done.


Who knows... It does *nothing* on my FF3. No, wait! "object is
undefined" in jquery-1.2.6.js line 725.

Gregor


--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur fr den alpinen Raum
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      08-11-2008
Gregor Kofler wrote:
> torso meinte:
>> So I get all wrong. Okey.
>> How I should do it.

>
> You can't. Period. All those multi-file uploaders nowadays use flash.


It would seem that depends on how one defines a "multi-file uploader".
Could you please elaborate on those uploaders that use Flash?

>> http://www.fyneworks.com/jquery/multiple-file-upload/ there is some
>> kind of solution.
>> How that plugin is done.

>
> Who knows... It does *nothing* on my FF3.


WFM in Fx 3.0.1 on WinXP SP3 to the extent that I can select files
one-by-one which "hides" file inputs (position: absolute; top: -3000px) for
which I have selected a file, then creates a new empty file input in the
original place. If the form was submitted, all file inputs were submitted.
Say about jQuery all you want, but this one is not an entirely stupid approach.

> No, wait! "object is undefined" in jquery-1.2.6.js line 725.


I cannot reproduce that. What have you done to get this error?


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$(E-Mail Removed)>
 
Reply With Quote
 
Henry
Guest
Posts: n/a
 
      08-11-2008
On Aug 11, 11:01 am, Thomas PointedEars Lahn wrote:
> Gregor Kofler wrote:

<snip>
>> No, wait! "object is undefined" in jquery-1.2.6.js line 725.

>
> I cannot reproduce that. What have you done to get this error?


For me, just loading the page in to IE 6 brings up the error message
"Line: 726; 'length' is null or not an object". Given IE's tendency to
report error line numbers at least one off the real line that looks
suspiciously like the same error on a different browser.
 
Reply With Quote
 
Gregor Kofler
Guest
Posts: n/a
 
      08-11-2008
Thomas 'PointedEars' Lahn meinte:
> Gregor Kofler wrote:
>> torso meinte:
>>> So I get all wrong. Okey.
>>> How I should do it.

>> You can't. Period. All those multi-file uploaders nowadays use flash.




> It would seem that depends on how one defines a "multi-file uploader".
> Could you please elaborate on those uploaders that use Flash?


Perhaps flickr war one of the first sites to sport such a thing (well
hidden; "yuploadcomponent.swf"). From what I've read the client needs
Flash 8+.

Well, google gives me 300,000+ hits with "multiple file upload flash".

Perhaps this one
http://www.saschawenning.de/labor/flash8/fileUpload/
is among the rather lightweight ones.

>>> http://www.fyneworks.com/jquery/multiple-file-upload/ there is some
>>> kind of solution.
>>> How that plugin is done.

>> Who knows... It does *nothing* on my FF3.

>
> WFM in Fx 3.0.1 on WinXP SP3 to the extent that I can select files
> one-by-one which "hides" file inputs (position: absolute; top: -3000px) for
> which I have selected a file, then creates a new empty file input in the
> original place. If the form was submitted, all file inputs were submitted.


Ah. I was always expecting some "special" upload dialog (and never chose
anything) - yes, seems to be a simple, relatively hassle-free approach.
However, you are still stuck to "pick one file after another".

> Say about jQuery all you want, but this one is not an entirely stupid approach.


The approach is simple and - I suppose - working on most current
browsers. The script itself is 16k, gives you the creeps upon reading,
and can be done with half the lines as well - without the 100k+ jQuery
sinker.

>> No, wait! "object is undefined" in jquery-1.2.6.js line 725.

>
> I cannot reproduce that. What have you done to get this error?


Opened the page.

Gregor


--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      08-11-2008
Gregor Kofler wrote:
> Thomas 'PointedEars' Lahn meinte:
>> Gregor Kofler wrote:
>>> torso meinte:
>>>> So I get all wrong. Okey.
>>>> How I should do it.
>>> You can't. Period. All those multi-file uploaders nowadays use flash.

>> It would seem that depends on how one defines a "multi-file uploader".
>> Could you please elaborate on those uploaders that use Flash?

>
> [...]
> Well, google gives me 300,000+ hits with "multiple file upload flash".


Hence my asking

> Perhaps this one
> http://www.saschawenning.de/labor/flash8/fileUpload/
> is among the rather lightweight ones.


Thanks.

>> Say about jQuery all you want, but this one is not an entirely stupid approach.

>
> The approach is simple and - I suppose - working on most current
> browsers. The script itself is 16k, gives you the creeps upon reading,
> and can be done with half the lines as well - without the 100k+ jQuery
> sinker.


You are preaching to the choir, but you probably know that

>>> No, wait! "object is undefined" in jquery-1.2.6.js line 725.

>> I cannot reproduce that. What have you done to get this error?

>
> Opened the page.


Confirmed. Note to self: You need to enable the Console of Firebug 1.2.x
for the site explicitly, otherwise the status bar indicates no errors or
warnings.


Regards,

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$(E-Mail Removed)>
 
Reply With Quote
 
dhtml
Guest
Posts: n/a
 
      08-12-2008
Gregor Kofler wrote:
> torso meinte:
>> So I get all wrong. Okey.
>> How I should do it.

>
> You can't. Period. All those multi-file uploaders nowadays use flash.
>


Well you can in Firefox 3.

Here's proof:
http://dhtmlkitchen.com/ape/example/form/Form.html

This may or may not be implemented in other browsers in the near future.


> Gregor
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Html file control with multiple file selection Prashant ASP .Net 2 08-28-2007 02:34 PM
Multiple Partial class file in aspx code behind file? Hiten ASP .Net 2 08-23-2006 04:52 AM
How to avoid multiple definition of a variable by multiple inclusion of a header file lars.uffmann@rwth-aachen.de C++ 11 08-05-2006 10:24 PM
Text files read multiple files into single file, and then recreate the multiple files googlinggoogler@hotmail.com Python 4 02-13-2005 05:44 PM
multiple file objects for some file? Gary Robinson Python 0 07-27-2003 02:22 PM



Advertisments