我需要将我的图像转换为base64字符串,以便我可以将我的图像发送到服务器.这个有没有js文件......?否则如何转换它
使用图像文件,我得到一个图像的URL,需要发送到Web服务.从那里,图像必须在我的系统上本地保存.
我正在使用的代码:
var imagepath = $("#imageid").val();// from this getting the path of the selected image
that var st = imagepath.replace(data:image/png or jpg; base64"/"");
Run Code Online (Sandbox Code Playgroud)
如何将图像URL转换为BASE64?