Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

File to XHR-requests

var xhr = new XMLHttpRequest(),
    fd = new FormData();

fd.append( 'file', input.files[0] );
xhr.open( 'POST', 'http://example.com/script.php', true );
xhr.onreadystatechange = handler;
xhr.send( fd );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #File
ADD COMMENT
Topic
Name
6+7 =