首页 > Web开发 > 详细

百度编辑器拦截上传图片提交上传腾讯server并返回腾讯url

时间:2017-05-13 10:50:54      阅读:423      评论:0      收藏:0      [点我收藏+]


微信图文编辑时图片必须为上传到腾讯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;

技术分享

百度编辑器拦截上传图片提交上传腾讯server并返回腾讯url

原文:http://www.cnblogs.com/claireyuancy/p/6848085.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!