I\'m trying to upload image with jQuery and ajax function, and how can I fetch all details of image file, like in php we use $_FILE()
Here is my code
You can use Ajaxfileupload.js to upload file:
$('input[type="file"]').ajaxfileupload({
'action': 'save_photo.php',
'params': {
'extra': 'info'
},
'onComplete': function(response) {
console.log('custom handler for file:');
alert(JSON.stringify(response));
},
'onStart': function() {
},
'onCancel': function() {
console.log('no file selected');
}
});
save_photo.php :