multiple file upload+xmlHttpRequest

Discussion in 'Javascript' started by torso, Aug 10, 2008.

  1. torso

    torso Guest

    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.
     
    torso, Aug 10, 2008
    #1
    1. Advertising

  2. 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+xmlhttprequest+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$>
     
    Thomas 'PointedEars' Lahn, Aug 10, 2008
    #2
    1. Advertising

  3. torso

    torso Guest

    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 <>
    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$>
     
    torso, Aug 10, 2008
    #3
  4. torso

    Matt Guest

    Gmail uses an iframe to do an "asynchronous" ajax-like file upload.

    On Aug 10, 3:57 pm, torso <> wrote:
    > 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 <>
    > 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$>

    >
    >
     
    Matt, Aug 11, 2008
    #4
  5. 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 für den alpinen Raum
     
    Gregor Kofler, Aug 11, 2008
    #5
  6. 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$>
     
    Thomas 'PointedEars' Lahn, Aug 11, 2008
    #6
  7. torso

    Henry Guest

    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.
     
    Henry, Aug 11, 2008
    #7
  8. 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
     
    Gregor Kofler, Aug 11, 2008
    #8
  9. 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$>
     
    Thomas 'PointedEars' Lahn, Aug 11, 2008
    #9
  10. torso

    dhtml Guest

    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
    >
    >
     
    dhtml, Aug 12, 2008
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2FyYXY=?=

    Upload a file without file Upload control - ASP.Net

    =?Utf-8?B?U2FyYXY=?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,491
    Bruce Barker
    Aug 3, 2005
  2. Heather Fraser
    Replies:
    0
    Views:
    649
    Heather Fraser
    Jul 5, 2004
  3. Replies:
    1
    Views:
    950
    Gabriel Genellina
    Nov 25, 2006
  4. Prakash
    Replies:
    3
    Views:
    478
    Ray at
    Nov 12, 2003
  5. Chamnap

    Multiple upload with multiple iframe

    Chamnap, Aug 16, 2007, in forum: Javascript
    Replies:
    5
    Views:
    147
    Chamnap
    Aug 17, 2007
Loading...

Share This Page