Reputation: 1002
I used base64 encoded to display image dynamically (by select image).
<img style="width: 412px;" src="data:image/gif;base64,R0lGODlhwAAAAXAAACH5BAEAAPwALA
How to send image to a server? by $.ajax() and without postback.
Thanks in advance
Upvotes: 1
Views: 3401
Reputation: 318162
$.ajax({
type: 'POST', //or get
url : 'urlToMyServer.aspx',
data: { img : $('img').attr('src') }
});
If the B64 is'nt really, really long, just send it the regular way ?
Upvotes: 2