I would like to send an image to a php file using AJAX.
Here\'s my JS code:
$.ajax({ type: \"POST\", url: \"http://website.com/a
If your sending your data using a post, The data property should be a json:
$.ajax({ type: "POST", url: "http://website.com/add-image.php", data: {img: img} })