• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Progress Bar when file upload


I have a jquery ajax upload system that works well.
However as I am uploading big files I would like to display a progress bar, or a simple percentage value, for the user to see that the upload didn't crash.

How could I implement that in my code ?

        rules: {
            userfile: {
                  required: true,
                accept: "mov|avi|mpg|flv"
        submitHandler: function(form) {
                target:        '#positive-result',  
                beforeSubmit:  showRequest,
                success:       showResponse  
    function showRequest(formData, jqForm, options) {
        var queryString = $.param(formData);
        return true;

    function showResponse(responseText, statusText)  {    
        $('#positive-result').html( 'Video added.');

[eluser]Colin Williams[/eluser]
You essentially need to iteratively monitor the size of the uploading file on the server file system and compare it to the total size of the file.

To my understanding, this takes special configuration of the server, using the apc_fetch() or uploadprogress_get_info() functions available in the PECL extension.

yeah i can't configure APC :-(

You could use a flash based uploader, e.g. swfupload.org.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.