问题
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
回答1:
$.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 ?
来源:https://stackoverflow.com/questions/13905681/how-to-send-image-base64-to-server