{
            if (tests.formdata) formData.append('binary', files[i]);
            previewfile(files[i]);  //TO show the filename on completion
        }
        formData.append('payload', "sent from Browser client")

        // now post a new XHR request
        if (tests.formdata) {
            var xhr = new XMLHttpRequest();

            xhr.onreadystatechange = function () {
                if (this.readyState == 4 && this.status == 200) {
                    alert(this.responseText)
                }
 