javascript callback to a java method, must use xhr.upload.onprogress