Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder godofreality's Avatar
    Join Date
    Jan 2009
    Posts
    234
    Thanks
    1
    Thanked 15 Times in 15 Posts

    file uploads with ajax?

    i have been trying to upload files using ajax to no avail so i did sum searching and it seems it is not possible so i was wondering if any1 has found a way to do it with ajax and if so could u help me out with it

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,273
    Thanks
    10
    Thanked 581 Times in 562 Posts
    it's only possible in firefox3 as far as i know.

    is that enough for you to want the code?
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #3
    Regular Coder godofreality's Avatar
    Join Date
    Jan 2009
    Posts
    234
    Thanks
    1
    Thanked 15 Times in 15 Posts
    heck yes give me the code lol no j/k i am just gonna try a work around just having issues with a status bar i really cannot figure out how to make that happen

  • #4
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,273
    Thanks
    10
    Thanked 581 Times in 562 Posts
    well i thought this would be popular, but i couldn'd find anything on google.

    so, i'll have to whip something up myself, but it's 3:30am here, so you'll have to wait until tommorow after work.

    basically i will combine something like the uploader part of
    http://www.captain.at/ajax-file-upload.php (it's file code needs about:config changes, screw that)

    with the kind of file-access code in
    http://soakedandsoaped.com/articles/...ax-file-upload (needs uploader ajax code)


    i'm surprised this hasn't been done already...
    Last edited by rnd me; 06-04-2009 at 09:39 AM.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #5
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Most file uploads people think are Ajax are really flash based. If you do not want to go the flash route you would have to post your form to a hidden iframe.

    Most of the work in the past with uploads have been done with progress bars. A google search of file upload with progress Ajax would probably turn up info.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #6
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,273
    Thanks
    10
    Thanked 581 Times in 562 Posts
    Quote Originally Posted by A1ien51 View Post
    Most file uploads people think are Ajax are really flash based. If you do not want to go the flash route you would have to post your form to a hidden iframe.
    not in firefox3...

    But it's a good point that if you are catching uploads in PHP, it might be better to use PHP all the way.

    Still, i think a true js-only uploader would be useful.
    I also want it to be able to PUT files, so you wouldn't need a server script at all...
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #7
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Yeah it is great you can do it with ff3, but 90% of the world is not using FF3.

    Gmail uses flash
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •