Ajax requests with file support

1
2
// Vanilla Javascript
var form = document.querySelector('form');
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This snippets shows how to make an ajax request sending the content as FormData making possible include files in the payload.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.