Is it possible to get multiple callbacks using jQuery .post for a ajax upload of an image to php?
I am sending an image to the server for processing thru binary string and would like to hav the front end display status when the image has uploaded then a processing icon.
Currently I am using the standard .post but ideally this is the scenario i am looking for -
jquery:
$.post( 'process.php', { myvar:myvar}, function(data){
    if(data=='callback_1'){
        // process 1
    }else if(data=='callback_2'){
        // process 2
    }
}); 
php:
$myvar = $_POST['myvar'];
// after process 1
echo 'callback_1'
// after process 2
echo 'callback_2'
 
     
    