Is it possible to pass file from JavaScript to PHP? (Best using ajax).If we have following code:
<!DOCTYPE html>
<html>
<body>
<input type='file' id='upld' onChange=' f=this.files[0] '>
<input type='button' onClick='ajax_pass()'>
<script>
function ajax_pass()
{
console.log(f);
//Send 'f' using ajax to php imaginary file...
}
</script>
</body>
</html>
I'm new to JS programming and can't imagine how POST or GET can contain whole image.Can you clarify it to me please?