我从网页上得到url格式的图片,怎么能上传到微信服务器

想使用微信的临时素材上传接口,https的post请求已经有了,但上传的是String类型的数据

先下载到本地,再base64转字符串,发送

``` public static String imgToBase64(String imgPath, Bitmap bitmap,
String imgFormat) {
if (imgPath != null && imgPath.length() > 0) {
bitmap = readBitmap(imgPath);
}
if (bitmap == null) {
// bitmap not found!!
}
ByteArrayOutputStream out = null;
//int beginRate = 100;
try {
out = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
out.flush();
out.close();
byte[] imgBytes = out.toByteArray();
return Base64.encodeToString(imgBytes, Base64.NO_WRAP);
} catch (Exception e) {
return null;
} finally {
try {
out.flush();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}