code: function (jqXHR) {
              var range = jqXHR.getResponseHeader('Range'),
                  parts = range && range.split('-'),
                  upperBytesPos = parts && parts.length > 1 &&
                      parseInt(parts[1], 10);
              return upperBytesPos && upperBytesPos + 1;
          }
docs: Parses the Range header from the server response and returns the uploaded bytes: