如何将图像的base64发送到服务器发送到、如何将、图像、服务器

2023-09-10 20:58:08 作者:寄给你的风

我用的base64 EN codeD(通过选择图片)动态显示图像。

 < IMG风格=宽度:412px; SRC =数据:图像/ GIF; BASE64,R0lGODlhwAAAAXAAACH5BAEAAPwALA
 

如何发送图像到服务器?由$。阿贾克斯()和不回发。

在此先感谢

解决方案

  $。阿贾克斯({
    类型:'POST',//或获取
    网址:urlToMyServer.aspx,
    数据:{IMG:$('IMG')ATTR(SRC)。}
});
 

如果在B64 is'nt好长好长,只是把它的常规方法是什么?

微信发照片怎么在服务器上删除,我们发现微信发送原图,确实会暴露位置信息 但你可以这么解决...

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

解决方案

$.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 ?