百度编辑器拦截上传图片提交上传腾讯server并返回腾讯url
微信图文编辑时图片必须为上传到腾讯server的url,外连接所有屏蔽,则须要改动百度编辑器的源代码,源代码详细处理地方例如以下图。类为BinaryUploader.java
InputStream is = fileStream.openStream();
State storageState = StorageManager.saveFileByInputStream(is,physicalPath, maxSize);
is.close();
if (storageState.isSuccess()) {
//TODO 处理上传腾讯server
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;