function postFile(file) {
	let formdata = new FormData();
	formdata.append("image", file);
	let xhr = new XMLHttpRequest();
	xhr.open('POST', './', true);
	xhr.send(formdata);
	xhr.onload = function () {
	if (this.status === 200){
		options = this.response;
		if (options == "no_text")
			return sendImagefromCanvas();
		location.href = options;
		firstClick = false;
	}
	else
		console.error(xhr);
	};
}
//Add file blob to a form and post
Add file blob to a form and post
Add file blob to a form and post
function postFile(file) {
	let formdata = new FormData();
	formdata.append("image", file);
	let xhr = new XMLHttpRequest();
	xhr.open('POST', './', true);
	xhr.send(formdata);
	xhr.onload = function () {
	if (this.status === 200){
		options = this.response;
		if (options == "no_text")
			return sendImagefromCanvas();
		location.href = options;
		firstClick = false;
	}
	else
		console.error(xhr);
	};
}
function postFile ( file ) { let formdata = new FormData ( ) ; formdata . append ( "image" , file ) ; let xhr = new XMLHttpRequest ( ) ; xhr . open ( 'POST' , './' , true ) ; xhr . send ( formdata ) ; xhr . onload = function ( ) { if ( this . status === 200 ) { options = this . response ; if ( options == "no_text" ) return sendImagefromCanvas ( ) ; location . href = options ; firstClick = false ; } else console . error ( xhr ) ; } ; }
Add file blob to a form and post
Add file blob to a form and post