【发布时间】:2014-04-06 00:38:08
【问题描述】:
使用图像文件,我得到图像的 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"/"");
如何将图片url转成BASE64?
【问题讨论】:
-
如果您只是想对 url 而不是图像数据进行编码,您可能会在这里找到答案:stackoverflow.com/questions/246801/…
标签: javascript jquery