百度编辑器拦截上传图片提交上传腾讯server并返回腾讯url
2017-05-13 09:29
423 查看
微信图文编辑时图片必须为上传到腾讯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;
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;
相关文章推荐
- 百度编辑器拦截上传图片提交上传腾讯服务器并返回腾讯url
- 百度编辑器多图上传返回图片绝对路径问题
- 百度编辑器图片在线流量返回url修改
- 百度编辑器图片在线流量返回url改动
- 百度编辑器多图上传返回图片绝对路径问题
- asp.net应用百度编辑器(UEditor)上传图片和上传附件不成功的解决办法
- 关于百度UEditor在ssh图片上传被拦截
- 百度编辑器之上传图片
- 修复百度编辑器(UM)禁用时上传图片按钮还可点击的BUG;
- dedecms整合百度编辑器(Ueditor)之上传图片加水印的办法
- ueditor-------百度编辑器,跨目录上传图片等
- 七牛iOS按顺序依次上传多张图片,一个block返回所有上传的url
- 为百度UEDITOR编辑器上传图片添加水印
- 百度Ueditor在线编辑器的配置和图片上传
- 百度编辑器服务器端上传图片显示”目录没有写权限"
- 百度UEditor在线编辑器上传图片提示网络连接错误,请检查配置后重试 asp.net 4.0
- 关于百度world 编辑器改变上传图片的保存路径图片不显示的问题
- 百度编辑器,图片上传优化
- asp.net应用百度编辑器(UEditor)上传图片跟上次附件不成功的解决办法
- asp.net 百度编辑器 UEditor 上传图片 图片上传配置 编辑器配置 网络连接错误,请检查配置后重试