标签:
微信图文编辑时图片必须为上传到腾讯服务器的url,外连接全部屏蔽,则需要修改百度编辑器的源码,源码具体处理地方如下图,类为BinaryUploader.java
InputStream is = fileStream.openStream();
State storageState = StorageManager.saveFileByInputStream(is,physicalPath, maxSize);
is.close();
if (storageState.isSuccess()) {
//TODO 处理上传腾讯服务器
String headurl=PropUtil.getPropertyValue("wx.sz.get.web.url","http://localhost:8080").replace("\"","");
String url =UploadToTX.uploadToTX(physicalPath, headurl+PathFormat.format(savePath));
storageState.putInfo("url", url);
storageState.putInfo("type", suffix);
storageState.putInfo("original", originFileName + suffix);
}
return storageState;
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/u010598111/article/details/47607841