Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
Clear progress bar after file upload
posted

Hi,

Is there a way to clear the progress bar after the file upload is complete? I am using the WebUpload for uploading a single file only.

My ultimate objective is to "reset" the upload control on a server event.

Awaiting reply, thanks in advance.

 

Parents
  • 1800
    posted

    Hi sharonks,

    If you upload only one file you can setup mode to be "single".

    Also you can hide the whole progressbar area. For instance: if your widget has id fileuploader then in fileuploaded event you can do $('#fileuploader_spbcntr').hide();

    Also if you want after each upload to be shown info ONLY for one file you can do this:

    $('#fileuploader').igUpload({

    ...

    fileUploaded:

     

    function (event, args) {

     

     

    var $fileuploader = $(this), data = $fileuploader.igUpload('getFileInfoData');

    data.fileSizeUploaded = 0;

     

    //args.totalSize;

    data.fileSizeTotal = 0;

     

    //args.totalSize;

     

     

    if (data.countUploadingFiles === data.countTotalFiles) {

    data.countUploadingFiles = 0;

    data.countTotalFiles = 0;

    }

     

    },

    ...

    });

    In this way when you start uploading new file it will be shown that count of total files is 1 and total uploading file size is only for the file you upload. This is a hack and as I said if you want to upload only one file you can set mode to single.

    Thanks,

    Miro Hristov

Reply Children