code: function (e, data) {
                  if (data.context) {
                      var progress = Math.floor(data.loaded / data.total * 100);
                      data.context.find('.progress')
                          .attr('aria-valuenow', progress)
                          .find('.bar').css(
                              'width',
                              progress + '%'
                          );
                  }
              }
docs: Callback for upload progress events: