WEB adding a progress bar to php uploads?

Discussion in 'OT Technology' started by drpepper, Oct 13, 2008.

  1. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    i heard you cant do this without a patched version of php?
    anything simple to add?

    it sucks just starting at the fucking screen when the file is 100mb+
    if anyone can help me or do it, id be willing to purchase a year sub or some cash monies.
     
  2. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    The good news is a hook in the API finally got added in 5.2 to prevent having to patch PHP.

    There's a PECL extension that provides this, but the documentation seems to be thin on the ground:

    http://pecl.php.net/package/uploadprogress
    Someone wrote some about it: http://uk2.php.net/manual/en/features.file-upload.php#71564

    File upload progress however is a client-side concern, so the more of this concern you can get the client to do, the better.

    So following that idea, looking at javascript + Flash / Java applet components to show progress is going to perform and scale far better than doing AJAX callbacks to the server for progress.

    e.g. something like http://digitarald.de/project/fancyupload/

    Sorry I can't give you specific code; the upload progress stuff I've done before was for .NET and when I do it again I'll be taking the javascript/flash/applet approach.
     
  3. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    thanks. good start.

    but :ugh: at this:
     
  4. Shampoo

    Shampoo Rinse & Repost

    Joined:
    May 5, 2004
    Messages:
    60,183
    Likes Received:
    0
    Location:
    California
    I've only seen a working version for Perl and Flash written. I too am also looking for such a thing to be made for PHP
     

Share This Page